Android问题集锦(十四)- The option 'android.enableAapt2' is deprecated and should not be used anymore.

今天在升级到Android studio3.1后,编译运行程序报以下异常:

Android问题集锦(十四)- The option 'android.enableAapt2' is deprecated and should not be used anymore._第1张图片
在Java compiler已经有很明显的警告提示了:

The option 'android.enableAapt2' is deprecated and should not be used anymore. Use 'android.enableAapt2=true' to remove this warning. It will be removed at the end of 2018..

意思就说android.enableAapt2已经被弃用了,不能被使用了。可以使用android.enableAapt2=true去除该警告,再clear build重新运行程序即可。

参考:

  • https://stackoverflow.com/questions/49534951/aapt2-working-abnormally-in-android-studio-3-1-both-for-true-and-false-flag

你可能感兴趣的:(疑难杂症)