error:style attribute '@android:attr/windowEnterAnimation' not found 解决

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013278099/article/details/80649354

不得不说谷歌有时候也是很坑的,这里吐槽下。

最近把老项目用android studio 3.1 打开,发现报错:

error:style attribute ‘@android:attr/windowEnterAnimation’ not found

才发现是aapt2 的错误,果断把aapt2 给禁用掉:

升上3.1之后,gradle build总是出现“The option ‘android.enableAapt2’ is deprecated and should not be used anymore. Use ‘android.enableAapt2=true’ to remove this warning.
打开gradle.properties添加下面代码即可解决:
android.enableAapt2=false

特么build 并没有发现错误,然后install 出现了:

java.util.NoSuchElementException :

有点蒙逼,然后关闭了InstantRun

这里写图片描述

再运行就好了,好坑啊,这里记录下

猜你喜欢

转载自blog.csdn.net/u013278099/article/details/80649354