2
我不能够建立我的项目,因为我得到这个错误错误检索父的项目:无资源发现在给定的名字相匹配“的Android版本:Widget.Material.Button.Colored”
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(33) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processStageDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/john/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
/Users/john/AndroidStudioProjects/app/build/intermediates/res/merged/stage/debug/values-v23/values-v23.xml
这是我的build.gradle
android {
def versionCodeValue = 1
def versionNameValue = "1.0"
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.sample.test"
minSdkVersion 17
targetSdkVersion 22
versionCode versionCodeValue
versionName versionNameValue
}
}
dependencies {
def supportLibVersion = "22.2.1"
compile 'com.android.support:support-v4:' + supportLibVersion
compile 'com.android.support:design:' + supportLibVersion
compile 'com.android.support:appcompat-v7:' + supportLibVersion
compile 'com.android.support:cardview-v7:' + supportLibVersion
compile 'com.android.support:recyclerview-v7:' + supportLibVersion
}
我更新supportlibrary后出现此错误。我不想使用目标SDK 23.我不想在RuntimePermission的应用
这是我styles.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="android:windowBackground">@color/colorLightGrey</item>
<item name="android:textViewStyle">@style/myTextViewStyle</item>
<item name="android:buttonStyle">@style/myButtonStyle</item>
<item name="android:editTextStyle">@style/myEditTextStyle</item>
</style>
我不明白为什么它会显示错误价值观v23.xml,因为我不使用版本23。它显示了
/Users/john/AndroidStudioProjects/app/build/intermediates/res/merged/stage/debug/values-v23/values-v23.xml
我已经包含在问题styles.xml。建议使用哪一个 – John
我编辑了我的答案。 – wanglugao