Android 如何定位values.xml?
我最近购买了一台MacBook Pro,并在新Mac上将一个旧项目导入我的android studio后下载了最新版本的android studio,我有很多错误可以修复,但有一个错误我似乎找不到答案。上面说 错误:未找到样式属性“@android:attr/windowEnterAnimation”。 消息{kind=ERROR,text=ERROR:style属性'@android:attr/windowEnterAnimation',sources=[/Users/acontofuser/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.0.2.aar/97d47f978f7d2c60194030528adee8d/res/values/values.xml:1423:5-1464:13],原始消息=,工具名=可选的.of(AAPT)} 这就是我的style.xml的样子Android 如何定位values.xml?,android,Android,我最近购买了一台MacBook Pro,并在新Mac上将一个旧项目导入我的android studio后下载了最新版本的android studio,我有很多错误可以修复,但有一个错误我似乎找不到答案。上面说 错误:未找到样式属性“@android:attr/windowEnterAnimation”。 消息{kind=ERROR,text=ERROR:style属性'@android:attr/windowEnterAnimation',sources=[/Users/acontofuser/
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
@颜色/原色
@颜色/原色暗
@颜色/颜色重音
假的
真的
建议说我应该删除@android:attr前面的“@”标志。但问题是,我甚至找不到values.xml的位置,而且上面都删除了“@”符号。如果在
style.xml中有这样一行:
<item name="@android:windowEnterAnimation">@anim/something</item>
@anim/something
从@android
中删除@
,尽管解决方案可能会延迟,但在我的情况下,我确保我使用的所有第三方库都已更新。因此错误消失了。我猜您的编译版本低于27
。要使用appcompat-v7:27.0.2
,您需要将compileSdkVersion
和targetSdkVersion
设置为27。是的,我的compileSdkVersion是27,targetSdkVersion也是27。我已经编辑了我的问题,并添加了my styles.xml的外观。我没有类似于@anim/的东西there@chevi99你用过3d派对库吗?是的,我用的是hdendof circle imageView和searchableSpinnerlibraries@chevi99其中一个库可能包含此属性。如果可能的话,为了进行测试,请移除它们,一次一个,然后重试。谢谢您的建议。实际上,我将这些库升级到了它们的最新版本,一切都很好。