Created
January 26, 2017 03:53
-
-
Save zhanzengyu/f23a8ec22a607ed4a9f7d87bdc3f0747 to your computer and use it in GitHub Desktop.
提供了在jenkins自动构建时遇到的一些bug及解决方式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are some bug when we build android project with gradle,now give some solutions follow: | |
1. | |
bug: | |
ProGuard, version 5.2.1 | |
Reading input... | |
Execution failed for task 'project:transformClassesAndResourcesWithProguardForRelease'. | |
java.io.IOException: Please correct the above warnings first. | |
solution: | |
disable the ProGuard first. | |
check you module build.gradle,make the minifyEnabled's value to be false. | |
minifyEnabled false | |
2. | |
bug: | |
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: aidl is missing | |
solution: | |
it means you compileSdkVersion and buildToolsVersion is not very fit. | |
I am use 25 and 25.0.0 and get this error.Then I instead of 23 and 23.0.2.And this error is solve. | |
3. | |
bug: | |
Caused by: org.gradle.api.InvalidUserDataException: File 'project/module/build/intermediates/res/ | |
resources-release-stripped.ap_' specified for property 'resourceFile' does not exist. | |
solution: | |
set shrinkResources's value to be false | |
shrinkResources false | |
4. | |
bug: | |
Caused by: org.gradle.api.GradleException: Buildtools 25.0.0 requires Java 1.8 or above. Current JDK version is 1.7. | |
or other show your jdk is not fit | |
solution: | |
in jenkins,change the task from | |
assemble --stacktrace | |
to | |
assemble --stacktrace -Dorg.gradle.java.home='yourjdkhome' | |
5. | |
bug: | |
Caused by: java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0 | |
solution: | |
check your gradle version and jdk version.mostly it's your jdk version.You can try the bug4 solution and see whether it solve or not. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment