android studio 创建动画时报错:Error: style attribute '@android:attr/windowExitAnimation' not found的解决办法

在编写安卓动画时,遇到了Error: style attribute '@android:attr/windowExitAnimation' not found的报错

style中的代码如下


    

报错如下

android studio 创建动画时报错:Error: style attribute '@android:attr/windowExitAnimation' not found的解决办法_第1张图片

按照以下代码所示去掉style文件中的@即可,修改后的代码如下

    
    

编译通过,问题解决,为什么这样可以解决,我并不清楚,如果有人知道希望可以告诉我

你也可以通过关闭aapt解决问题

android.enableAapt2=false

但这会无法使用as的instant run 特性,我看国内的博文大多用这个方法实现的

你可能感兴趣的:(安卓学习之流水账)