Error while generating dependencies split APK
com.android.ide.common.process.ProcessException: Failed to execute aapt
Caused by: java.util.NoSuchElementException
:app:transformDexWithInstantRunDependenciesApkForDebug FAILED
:app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
* What went wrong:
Execution failed for task ':app:transformDexWithInstantRunDependenciesApkForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Failed to execute aapt
解决方式:
之前在项目打包发布apk的时候出错,添加语句如下图:
android.enableAapt2=false
后来发现,它对打包发布没有什么影响!但是项目运行不了啦!
报如上错误,要想项目能运行就把此条代码给注释了!
相关链接:Android Studio项目打包:常见错误1:Execution failed for task ':app:mergeReleaseResources'
扩展:
如果加此条语句进行打包发布apk,对防反编译是不是一道坎呢?
因为反编译后,有此条语句项目运行不了!
还有此条语句的深刻含义?找个时间好好研究下吧。。。。。。