【问题标题】:style attribute '@android:attr/windowEnterAnimation' not found [closed]未找到样式属性“@android:attr/windowEnterAnimation”[关闭]
【发布时间】:2017-08-19 02:30:54
【问题描述】:

我打开android项目,出现这个错误,我该如何解决?

信息:Gradle 任务 [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar] 警告:android.dexOptions.incremental 属性已被弃用,它对构建过程没有影响。 /Users/Ren/Desktop/17live/app/src/main/res/values/styles.xml 错误:(515, 5) 未找到样式属性“@android:attr/windowEnterAnimation” 错误:(515, 5) 未找到样式属性“@android:attr/windowExitAnimation” 错误:(577, 5) 样式属性 '@android:attr/windowEnterAnimation' 未找到 错误:(577, 5) 未找到样式属性“@android:attr/windowExitAnimation” 错误:/Users/Ren/Desktop/17live/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:3534 样式属性“@android:attr/windowEnterAnimation”未找到 错误:/Users/Ren/Desktop/17live/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:3796 样式属性“@android:attr/windowEnterAnimation”未找到 错误:链接引用失败 错误:java.util.concurrent.ExecutionException:com.android.builder.internal.aapt.AaptException:AAPT2 链接失败: 错误:com.android.builder.internal.aapt.AaptException:AAPT2 链接失败: 错误:任务 ':app:processDebugResources' 执行失败。

执行 aapt 失败 信息:在 13 秒内构建失败 信息:10个错误 信息:1 个警告 信息:在控制台中查看完整的输出

【问题讨论】:

  • 为什么跑题???

标签: java android xml


【解决方案1】:

转到 res/style.xml,您可以在 android 之前删除 @,如果有任何 .xml,请删除 .xml 并重建您的项目。你的风格应该是这样的

<item name="android:windowEnterAnimation">@anim/slide_down_dialog</item>

【讨论】:

  • 谢谢大家,我现在知道如何修复它,但不是添加@,而是删除@,它工作正常,我的项目正在运行
猜你喜欢
  • 2018-04-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-01-19
  • 2021-02-10
相关资源
最近更新 更多