我的抽屉导航 Activity 一创建,就会打开包含以下代码的 values-v23.xml 文件:
?android:attr/actionBarItemBackground
<item name="controlBackground">@drawable/abc_control_background_material</item>
</style>
<style name="Base.V23.Theme.AppCompat.Light" parent="Base.V22.Theme.AppCompat.Light">
<!-- We can use the platform drawable on v23+ -->
<item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
<item name="controlBackground">@drawable/abc_control_background_material</item>
</style>
<!-- From: file:/usr/local/google/buildbot/repo_clients/https___googleplex-android.googlesource.com_a_platform_manifest.git/mnc-release/frameworks/support/v7/appcompat/res/values-v23/styles_base.xml -->
<eat-comment/>
<style name="Base.Widget.AppCompat.Button.Colored" parent="android:Widget.Material.Button.Colored"/>
它无法解析“android:TextAppearance.Material.Widget.Button.Inverse”和 “android:Widget.Material.Button.Colored”。
我还在堆栈跟踪中收到此错误消息:
错误:(1) 检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.Button.Inverse”匹配的资源。 错误:(1) 检索项目的父项时出错:找不到与给定名称“android:Widget.Material.Button.Colored”匹配的资源。 错误:任务 ':app:processDebugResources' 执行失败。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Vanessa Anthony\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
对于解决此问题的任何帮助,我们将不胜感激。
最佳答案
在 Android SDK 管理器中下载最新的(修订版 23)Android SDK Build-tools 并更新 Android SDK Platform-tools 和 Android SDK Tools.
关于android - 我在 Android Studio 中创建 Navigation Drawer Activity 后立即收到一条错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32290537/