Android问题集锦(十四)- The option 'android.enableAapt2' is deprecated and should not be used anymore.
今天在升级到Android studio3.1后,编译运行程序报以下异常:
在Java compiler已经有很明显的警告提示了:
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
意思就说android.enableAapt2
已经被弃用了,不能被使用了。默认情况下在gradle.properties
中android.enableAapt2=false
,此时只需把android.enableAapt2=true
,再clear build
重新运行程序即可。
参考: