今天在升级到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重新运行程序即可。
参考: