Closed
Description
I can't build this project on Windows any way I try.
If I try to use ant, I get compiler errors:
C:\Projects\Extern\owncloud\android> ant debug
Buildfile: C:\Projects\Extern\owncloud\android\build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
-setup:
[echo] Project Name: ownCloud
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for ownCloud...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Projects\Extern\owncloud\android\bin\rsObj
[mkdir] Created dir: C:\Projects\Extern\owncloud\android\bin\rsLibs
[echo] ----------
[echo] Resolving Dependencies for ownCloud...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
nodeps:
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
-setup:
[echo] Project Name: owncloud-android-library
[gettype] Project Type: Android Library
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for owncloud-android-library...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for owncloud-android-library...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found new input file
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
[echo] Creating library output jar file...
-post-compile:
[echo] Copying jar file for binary distribution
-obfuscate:
-dex:
[echo] Library project: do not convert bytecode...
-crunch:
[crunch] Crunching PNG Files in source dir: C:\Projects\Extern\owncloud\android\owncloud-android-library\res
[crunch] To destination dir: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[echo] Library project: do not package resources...
-package:
[echo] Library project: do not package apk...
-post-package:
-do-debug:
[echo] Library project: do not create apk...
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
-post-build:
debug:
nodeps:
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
-setup:
[echo] Project Name: ActionBarSherlock
[gettype] Project Type: Android Library
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for ActionBarSherlock...
[gettarget] Project Target: Android 4.0
[gettarget] API level: 14
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for ActionBarSherlock...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found Deleted Target File
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
[javac] Compiling 1 source file to C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 3 warnings
[echo] Creating library output jar file...
-post-compile:
-obfuscate:
-dex:
[echo] Library project: do not convert bytecode...
-crunch:
[crunch] Crunching PNG Files in source dir: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\res
[crunch] To destination dir: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[echo] Library project: do not package resources...
-package:
[echo] Library project: do not package apk...
-post-package:
-do-debug:
[echo] Library project: do not create apk...
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop
-post-build:
debug:
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found Deleted Target File
[aapt] Generating resource IDs...
[aapt] aapt: warning: string 'move_choose_button_text' has no default translation in C:\Projects\Extern\owncloud\android\owncloud-android-library\res; fo
und: de_CH
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 123 source files to C:\Projects\Extern\owncloud\android\bin\classes
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\OnEnforceableRefreshListener.java:3: error: cannot find symbol
[javac] import android.support.v4.widget.SwipeRefreshLayout;
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: package android.support.v4.widget
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\OnEnforceableRefreshListener.java:5: error: package SwipeRefreshLayout do
es not exist
[javac] public interface OnEnforceableRefreshListener extends SwipeRefreshLayout.OnRefreshListener {
[javac] ^
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\OCFileListFragment.java:27: error: cannot find symbol
[javac] import android.support.v4.widget.SwipeRefreshLayout;
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: package android.support.v4.widget
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:24: error: cannot find symbol
[javac] import android.support.v4.widget.SwipeRefreshLayout;
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: package android.support.v4.widget
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:57: error: cannot find symbol
[javac] private SwipeRefreshLayout mRefreshLayout;
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: class ExtendedListFragment
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:58: error: cannot find symbol
[javac] private SwipeRefreshLayout mRefreshEmptyLayout;
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: class ExtendedListFragment
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:300: error: cannot find symbol
[javac] private void onCreateSwipeToRefresh(SwipeRefreshLayout refreshLayout) {
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: class ExtendedListFragment
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:422: error: cannot find symbol
[javac] .setProgress(100, 0, download.getSize() < 0)
[javac] ^
[javac] symbol: method setProgress(int,int,boolean)
[javac] location: class Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:443: error: cannot find symbol
[javac] mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotificationBuilder.build());
[javac] ^
[javac] symbol: method build()
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:454: error: cannot find symbol
[javac] mNotificationBuilder.setProgress(100, percent, totalToTransfer < 0);
[javac] ^
[javac] symbol: method setProgress(int,int,boolean)
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:458: error: cannot find symbol
[javac] mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotificationBuilder.build());
[javac] ^
[javac] symbol: method build()
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:488: error: cannot find symbol
[javac] .setProgress(0, 0, false);
[javac] ^
[javac] symbol: method setProgress(int,int,boolean)
[javac] location: class Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:514: error: cannot find symbol
[javac] mNotificationManager.notify(tickerId, mNotificationBuilder.build());
[javac] ^
[javac] symbol: method build()
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:705: error: cannot find symbol
[javac] .setProgress(100, 0, false)
[javac] ^
[javac] symbol: method setProgress(int,int,boolean)
[javac] location: class Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:718: error: cannot find symbol
[javac] mNotificationManager.notify(R.string.uploader_upload_in_progress_ticker, mNotificationBuilder.build());
[javac] ^
[javac] symbol: method build()
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:728: error: cannot find symbol
[javac] mNotificationBuilder.setProgress(100, percent, false);
[javac] ^
[javac] symbol: method setProgress(int,int,boolean)
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:732: error: cannot find symbol
[javac] mNotificationManager.notify(R.string.uploader_upload_in_progress_ticker, mNotificationBuilder.build());
[javac] ^
[javac] symbol: method build()
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:769: error: cannot find symbol
[javac] .setProgress(0, 0, false);
[javac] ^
[javac] symbol: method setProgress(int,int,boolean)
[javac] location: class Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:829: error: cannot find symbol
[javac] mNotificationManager.notify(tickerId, mNotificationBuilder.build());
[javac] ^
[javac] symbol: method build()
[javac] location: variable mNotificationBuilder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\notifications\NotificationBuilderWithProgressBar.java:75: error: method does not over
ride or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\notifications\NotificationBuilderWithProgressBar.java:121: error: method does not ove
rride or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\notifications\NotificationBuilderWithProgressBar.java:123: error: cannot find symbol
[javac] Notification result = super.build();
[javac] ^
[javac] symbol: method build()
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\syncadapter\FileSyncAdapter.java:506: error: cannot find symbol
[javac] .notify(id, builder.build());
[javac] ^
[javac] symbol: method build()
[javac] location: variable builder of type Builder
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\FileDisplayActivity.java:1876: error: method does not override or impleme
nt a method from a supertype
[javac] @Override
[javac] ^
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:102: error: cannot find symbol
[javac] mRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_files);
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: class ExtendedListFragment
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:103: error: cannot find symbol
[javac] mRefreshEmptyLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_files_emptyView);
[javac] ^
[javac] symbol: class SwipeRefreshLayout
[javac] location: class ExtendedListFragment
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:238: error: method does not override or impleme
nt a method from a supertype
[javac] @Override
[javac] ^
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:245: error: method onRefresh in interface OnEnf
orceableRefreshListener cannot be applied to given types;
[javac] mOnRefreshListener.onRefresh();
[javac] ^
[javac] required: boolean
[javac] found: no arguments
[javac] reason: actual and formal argument lists differ in length
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\OCFileListFragment.java:101: error: package SwipeRefreshLayout does not e
xist
[javac] SwipeRefreshLayout.OnRefreshListener.class.getSimpleName());
[javac] ^
[javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\FolderPickerActivity.java:565: error: method does not override or impleme
nt a method from a supertype
[javac] @Override
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 30 errors
[javac] 3 warnings
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:720: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.
Total time: 6 seconds
If I try using Maven, mvn package
succeeds, however the resulting .apk is broken - it does not contain any class files, and attempting to start it on the Android device results in:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.owncloud.android/com.owncloud.android.ui.activity.FileDisplayActivity}: java.lang.ClassNotFoundException: Didn't find class "com.owncloud.android.ui.activity.FileDisplayActivity" on path: DexPathList[[zip file "/mnt/asec/com.owncloud.android-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.owncloud.android-1/lib, /vendor/lib, /system/lib]]
If I try using Gradle, I get:
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for debugTest as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find com.android.support:support-v4:19.1.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/19.1.0/support-v4-19.1.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar
file:/C:/Projects/Extern/owncloud/android/libs/support-v4-19.1.0.jar
file:/C:/Projects/Extern/owncloud/android/libs/support-v4.jar
Required by:
:android:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.176 secs
I did not try using the IDEs, as I understand these are just GUIs on top of some of the above tools.
This is on Windows 7 x64, using Java JDK 1.8.0-25 x64.
This is for the develop
branch. I've also tried the master
branch, however that one is even more so broken. pom.xml
references an outdated google.android-version
, and is missing a dependeny for disklrucache
.
Activity
tobiasKaminsky commentedon Jan 1, 2015
Please try it again with Java 7. I doubt that Android is working with Java 8 already.
CyberShadow commentedon Jan 1, 2015
The Oracle website seems down at the moment, but same results with JDK 1.6.0-35.
I finally managed to build an APK using a Linux virtual machine.
adb install
doesn't work in the VM though, so this isn't much of a development environment.tobiasKaminsky commentedon Jan 2, 2015
Maybe this is related to #800.
But there is also no solution so far :/
jab416171 commentedon Jun 29, 2015
@CyberShadow This issue is now 6 months old... Are you still unable to build?
CyberShadow commentedon Jun 29, 2015
Gradle still fails:
Apache Ant still fails:
Maven still fails:
So, yes, I'm still unable the build the
develop
branch, with either Gradle, Maven, or Ant.davivel commentedon Jul 28, 2015
@CyberShadow , did you run the
setup_env.bat
script?CyberShadow commentedon Jul 28, 2015
Yes, of course. I ran it as described in
SETUP.md
.davivel commentedon Jul 28, 2015
But you are trying with the three command line environement; are you running
setup_env.bat
with the proper argument each time you "switch"?Maven build is broken, anyway.
CyberShadow commentedon Jul 28, 2015
Yep.
davivel commentedon Jul 28, 2015
It's working fine for me from a fresh cloned project..
Do you have the Android SDK installed and the %ANDROID_HOME% environment variable pointing to it? Seems in your logs that Gradle is downloading the SDK from the Maven repository, we didn't check an environment without preinstalling it.
CyberShadow commentedon Jul 28, 2015
I don't doubt that it works for someone :) Not me unfortunately.
Yep.
Maybe I'm missing some Android SDK component? I did install the ones in the build instructions.
7 remaining items