错误日志
一直在做的项目,升级了最新的android studio之后,就出现了这个错误。
Build file 'D:\work_space\project\DeQinApp\app\build.gradle' line: 1
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.application']
> The option 'android.enableAapt2' is deprecated.
The current default is 'true'.
It has been removed from the current version of the Android Gradle plugin.
This property has no effect, AAPT2 is now always used.
从The option ‘android.enableAapt2’ is deprecated.
The current default is ‘true’.
警告中可以看出,android.enableAapt2现在不能用了,过期了。
解决方法:
1.找到整个项目目录下的gradle.properties文件,把android.enableAapt2的值改为“android.enableAapt2=true”就可以了,此方法已经尝试,可以使用。
如果有疑问,欢迎留言!