gpt4 book ai didi

java - 找不到与名称匹配的资源 - Android Studio

转载 作者:行者123 更新时间:2023-12-02 04:22:54 25 4
gpt4 key购买 nike

我刚刚下载了 Android Studio 并创建了一个新项目。

立即,我收到两个错误:

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

这是我的等级:

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.example.test.testapp"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
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.0.1'
}

和我安装的软件包:

enter image description here enter image description here

这里出了什么问题?谢谢

最佳答案

在你的gradle中,compileSdkVersion是22,而你的支持库版本是23。两者应该匹配。

参见Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

关于java - 找不到与名称匹配的资源 - Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32546082/

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