gpt4 book ai didi

android - 值-v28.xml :5:5-8:13: AAPT: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius' )

转载 作者:行者123 更新时间:2023-11-30 05:08:19 25 4
gpt4 key购买 nike

在我的 native react 项目中,我无法生成发布 apk(它在 Debug模式下工作),因为我收到此错误:

values-v28.xml:5:5-8:13: AAPT: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius')

我知道当你的 compileSdkVersion 与你的库版本不同时会发生这个问题,但我的情况不是这样。

这是我的 build.gradle 文件:

android {
compileSdkVersion 26
buildToolsVersion '26.0.3'

defaultConfig {
...
minSdkVersion 18
targetSdkVersion 26
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
...
}

dependencies {
compile project(':react-native-google-signin')
compile project(':react-native-i18n')
implementation 'com.google.firebase:firebase-core:16.0.1'
compile project(':react-native-onesignal')
compile project(':react-native-push-notification')
compile project(':react-native-vector-icons')
compile project(':react-native-fbsdk')
compile project(':react-native-config')
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.facebook.react:react-native:+'
// From node_modules
implementation project(':react-native-google-signin')
}

如您所见,所有版本都是 26。

我也尝试将版本设置为 28(compileSdkVersion、buildToolsVersion 和 com.android.support:appcompat-v7),但仍然出现错误。

最佳答案

在我的项目中,我创建了一个新模块,lib: "androidx.appcompat:appcompat"是由 IDE 导入的,在我删除它之后,构建工作正常。

我发现,除非使用大于目标 27 的构建版本,否则不能使用 androidx 库。

关于android - 值-v28.xml :5:5-8:13: AAPT: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54162275/

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