gpt4 book ai didi

android - 无法解析符号'android :TextAppearance. Material.Widget.Button.Inverse

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:36:00 25 4
gpt4 key购买 nike

我已经在android studio中创建了项目,但是出现了以下错误。

错误:

C:\Learning\Android\Design\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\res\values-v23\values-v23.xml

Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException:

org.gradle.process.internal.ExecException: Process 'command 'E:\Android\build-tools\22.0.0\aapt.exe'' finished with non-zero exit value 1

代码

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- From: file:/usr/local/google/buildbot/src/googleplex-android/mnc-supportlib-release/frameworks/support/v7/appcompat/res/values-v23/styles_base_text.xml -->
<eat-comment/>
<style name="Base.TextAppearance.AppCompat.Widget.Button.Inverse" parent="android:TextAppearance.Material.Widget.Button.Inverse"/>
<!-- From: file:/usr/local/google/buildbot/src/googleplex-android/mnc-supportlib-release/frameworks/support/v7/appcompat/res/values-v23/themes_base.xml -->
<eat-comment/>
<style name="Base.Theme.AppCompat" parent="Base.V23.Theme.AppCompat"/>
<style name="Base.Theme.AppCompat.Light" parent="Base.V23.Theme.AppCompat.Light"/>
<style name="Base.V23.Theme.AppCompat" parent="Base.V22.Theme.AppCompat">
<!-- We can use the platform drawable on v23+ -->
<item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
<!-- We can use the platform styles on v23+ -->
<item name="actionMenuTextColor">?android:attr/actionMenuTextColor</item>
<item name="actionMenuTextAppearance">?android:attr/actionMenuTextAppearance</item>

<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>
<!-- We can use the platform styles on v23+ -->
<item name="actionMenuTextColor">?android:attr/actionMenuTextColor</item>
<item name="actionMenuTextAppearance">?android:attr/actionMenuTextAppearance</item>

<item name="controlBackground">@drawable/abc_control_background_material</item>
</style>
<!-- From: file:/usr/local/google/buildbot/src/googleplex-android/mnc-supportlib-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"/>

最佳答案

设置您的 compileSdkVersion 和 buildToolsVersion 以匹配您正在使用的支持库的主要版本:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.your.app"
minSdkVersion 14
targetSdkVersion 23
versionCode YOUR CODE
versionName "Your.Version.Number"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:percent:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
}

关于android - 无法解析符号'android :TextAppearance. Material.Widget.Button.Inverse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34200432/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com