當我工作室的Android版本升級到2.3,和gradle這個版本3.3和Android gradle這個插件版本2.3.0,並buildToolsVersion版本25.0.0,它有一些問題當我使用這個命令「gradlew assembleRelease」來打包我的應用程序。執行失敗的任務「:應用程序:transformClassesAndResourcesWithProguardForXXXRelease」
Shrinking...
Printing usage to [E:\workspace\android_source\src\app\build\outputs\mapping\XXX\release\usage.txt]...
Removing unused program classes and class elements...
Original number of program classes: 10650
Final number of program classes: 10247
Optimizing...
Warning: Exception while processing task java.io.IOException: java.lang.NullPointerException
:app:transformClassesAndResourcesWithProguardForXXXRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForXXXRelease'.
> Job failed, see logs for details
* 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: 1 mins 34.554 secs
但是當我降級的Android gradle這個插件2.2.3版本,並buildToolsVersion到23.0.1,它運作良好。
您的構建工具和Gradle可以進一步更新。可能會幫助 –
但它是最新的 – forevas
不,他們不是。搖籃是在3.4和構建工具都大於25 –