(Androidx)error: expected reference but got (raw string) @+android:style/Anima

error: expected reference but got (raw string) @+android:style/Animation.Translucent.

解决方法:

网上提供的解决方法: 
修改gradle.properties文件,增加以下参数配置: 
android.enableAapt2=false

本文用到的解决方法: 
原因是代码中的 + 的锅,有可能出现的问题是,无法定位到出现问题的代码所在位置,我们可以通过Find in path 查找相关代码,并加以修改. 
(Androidx)error: expected reference but got (raw string) @+android:style/Anima_第1张图片
问题代码出在thmes.xml文件当中 
(Androidx)error: expected reference but got (raw string) @+android:style/Anima_第2张图片

找到出错位置,修改代码即可,修改为

@android:style/Animation.Translucent 
这里写图片描述

 

你可能感兴趣的:(Androidx)