在我的react本机项目中,我无法生成版本apk (它在调试模式下工作),因为我得到了以下错误:
值-v28.xml:5:5-8:13: AAPT:找不到与给定名称匹配的资源(在“dialogCornerRadius”处有值?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),但我仍然得到了错误。
发布于 2019-01-17 03:53:53
在我的项目中,我创建了一个新的模块,lib:"androidx.appcompat:appcompat“是由IDE导入的,在我删除它之后,正常地构建工作。
我发现,除非使用大于目标27的构建版本,否则不能使用androidx。
https://stackoverflow.com/questions/54162275
复制相似问题