Closed CyberShadow closed 8 years ago
Please try it again with Java 7. I doubt that Android is working with Java 8 already.
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.
Maybe this is related to #800. But there is also no solution so far :/
@CyberShadow This issue is now 6 months old... Are you still unable to build?
Gradle still fails:
C:\Projects\Extern\owncloud\android> gradlew clean build
Downloading https://services.gradle.org/distributions/gradle-2.2.1-all.zip
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping C:\Users\Vladimir\.gradle\wrapper\dists\gradle-2.2.1-all\6dibv5rcnnqlfbq9klf8imrndn\gradle-2.2.1-all.zip to C:\Users\Vladimir\.gradle\wrapper\dists\gradle-2.2.1-all\6dibv5rcnnqlfbq9klf8imrndn
Download https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/builder/1.0.0/builder-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint/24.0.0/lint-24.0.0.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.1/proguard-gradle-5.1.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-parent/5.1/proguard-parent-5.1.pom
Download https://repo1.maven.org/maven2/com/android/tools/sdk-common/24.0.0/sdk-common-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/common/24.0.0/common-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-test-api/1.0.0/builder-test-api-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/ddms/ddmlib/24.0.0/ddmlib-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/manifest-merger/24.0.0/manifest-merger-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-model/1.0.0/builder-model-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/sdklib/24.0.0/sdklib-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-checks/24.0.0/lint-checks-24.0.0.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-base/5.1/proguard-base-5.1.pom
Download https://repo1.maven.org/maven2/com/android/tools/layoutlib/layoutlib-api/24.0.0/layoutlib-api-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/dvlib/24.0.0/dvlib-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-api/24.0.0/lint-api-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/builder/1.0.0/builder-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint/24.0.0/lint-24.0.0.jar
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.1/proguard-gradle-5.1.jar
Download https://repo1.maven.org/maven2/com/android/tools/sdk-common/24.0.0/sdk-common-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/common/24.0.0/common-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-test-api/1.0.0/builder-test-api-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/ddms/ddmlib/24.0.0/ddmlib-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/manifest-merger/24.0.0/manifest-merger-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-model/1.0.0/builder-model-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/sdklib/24.0.0/sdklib-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-checks/24.0.0/lint-checks-24.0.0.jar
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-base/5.1/proguard-base-5.1.jar
Download https://repo1.maven.org/maven2/com/android/tools/layoutlib/layoutlib-api/24.0.0/layoutlib-api-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/dvlib/24.0.0/dvlib-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-api/24.0.0/lint-api-24.0.0.jar
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
> Could not find com.android.support:appcompat-v7:19.1.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/appcompat-v7/19.1.0/appcompat-v7-19.1.0.pom
https://repo1.maven.org/maven2/com/android/support/appcompat-v7/19.1.0/appcompat-v7-19.1.0.jar
file:/C:/Projects/Extern/owncloud/android/libs/appcompat-v7-19.1.0.jar
file:/C:/Projects/Extern/owncloud/android/libs/appcompat-v7.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: 55.562 secs
Apache Ant still fails:
C:\Projects\Extern\owncloud\android> ant clean debug
(... omitted ...)
-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:
-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] invalid resource directory name: C:\Projects\Extern\owncloud\android\res/values-tzl
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:653: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:698: null returned: 1
Total time: 6 seconds
Maven still fails:
C:\Projects\Extern\owncloud\android> mvn package
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.owncloud.android:owncloud:apk:1.5.1-SNAPSHOT
[WARNING] 'version' contains an expression but should be a constant. @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 9, column 14
[WARNING] 'dependencies.dependency.systemPath' for touch-image-view.jar:touch-image-view.jar:jar should not point at files within the project directory, ${basedir}/libs/touch-image-view.jar will be unresolvable by dependent projects @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 47, column 25
[WARNING] 'dependencies.dependency.systemPath' for android-support-v4.jar:android-support-v4.jar:jar should not point at files within the project directory, ${basedir}/third_party/android-support-library/android-support-v4.jar will be unresolvable by dependent projects @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 69, column 25
[WARNING] 'dependencies.dependency.systemPath' for android-support-v4.jar:android-support-v4.jar:jar refers to a non-existing file C:\Projects\Extern\owncloud\android\third_party\android-support-library\android-support-v4.jar @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 69, column 25
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Owncloud Android 1.5.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact com.actionbarsherlock:library:apklib:4.2.0 has been relocated to com.actionbarsherlock:actionbarsherlock:apklib:4.2.0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.716 s
[INFO] Finished at: 2015-06-29T20:38:50+00:00
[INFO] Final Memory: 23M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project owncloud: Could not resolve dependencies for project com.owncloud.android:owncloud:apk:1.5.1-SNAPSHOT: Could not find artifact android-support-v4.jar:android-support-v4.jar:jar:1.0 at specified path C:\Projects\Extern\owncloud\android\third_party\android-support-library\android-support-v4.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
So, yes, I'm still unable the build the develop
branch, with either Gradle, Maven, or Ant.
@CyberShadow , did you run the setup_env.bat
script?
Yes, of course. I ran it as described in SETUP.md
.
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.
But you are trying with the three command line environement; are you running setup_env.bat with the proper argument each time you "switch"?
Yep.
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.
It's working fine for me from a fresh cloned project..
I don't doubt that it works for someone :) Not me unfortunately.
Do you have the Android SDK installed and the %ANDROID_HOME% environment variable pointing to it?
Yep.
C:\Projects\Extern\owncloud\android> set | grep ANDROID
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
ANDROID_NDK=C:\Soft\android-ndk-r10b
Maybe I'm missing some Android SDK component? I did install the ones in the build instructions.
Mmm, it's not in the instructions, but I can see in my environment Android Support Repository
, in the Extras
folder.
Give it a try and tell us.
Sorry, I can't check anymore today.
After installing Android Support Repository
and updating develop
, the Gradle build now works. Thanks!
Not sure which of those two fixed it. I could look into it if there's interest. Ant build still fails.
It's the Android Support Repository
, we'll add it to the instructions in SETUP.md
.
About ant
, from your last log, my bet is on the verion of the Android SDK Tools
or/and Android SDK Build-tools
components. Check in your Android SDK Manager that you are using the last one. Google sneaked a bug in a previous version of those that totally broke ant builds (at least ours).
I installed all versions of Android SDK Build-Tools, which fixed the ant build.
I had versions 19.0.0 and 20.0.0 installed, so the remaining ones I installed today were 19.1.0, 21.1.2 and 22.0.1. SETUP.md said that "any version from 20 or later should work fine".
Yes, we'll have to update that also.
@davivel which version is required? Then setup.md should be updated according to that.
I can't build this project on Windows any way I try.
If I try to use ant, I get compiler errors:
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:If I try using Gradle, I get:
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 themaster
branch, however that one is even more so broken.pom.xml
references an outdatedgoogle.android-version
, and is missing a dependeny fordisklrucache
.