对话框\platforms\android\build\intermediates\res\merged\debug\values-v28\values-v28.xml:7:41-73: AAPT:找不到与给定名称匹配的资源(位于值为“?android:attr/
dialogCornerRadius”的“dialogCornerRadius”)
在构建android apk时遇到此错误。已尝试使用CompileSdkVersion = 27,BuildToolsVersion = "26.0.2“。还有一件事,我没有使用android studio,我只是使用命令行工具作为sdk管理器。不,我的build.gradle文件是这样的。
ext {
apply from: 'CordovaLib/cordova.gradle'
// The value for android.compileSdkVersion.
if (!project.hasProperty('cdvCompileSdkVersion')) {
cdvCompileSdkVersion = 27;
}
// The value for android.buildToolsVersion.
if (!project.hasProperty('cdvBuildToolsVersion')) {
cdvBuildToolsVersion = "26.0.2";
}
// Sets the versionCode to the given value.
if (!project.hasProperty('cdvVersionCode')) {
cdvVersionCode = 1
}
// Sets the minSdkVersion to the given value.
if (!project.hasProperty('cdvMinSdkVersion')) {
cdvMinSdkVersion = 15
}
// Whether to build architecture-specific APKs.
if (!project.hasProperty('cdvBuildMultipleApks')) {
cdvBuildMultipleApks = null
}
// .properties files to use for release signing.
if (!project.hasProperty('cdvReleaseSigningPropertiesFile')) {
cdvReleaseSigningPropertiesFile = null
}
// .properties files to use for debug signing.
if (!project.hasProperty('cdvDebugSigningPropertiesFile')) {
cdvDebugSigningPropertiesFile = null
}
// Set by build.js script.
if (!project.hasProperty('cdvBuildArch')) {
cdvBuildArch = null
}
// Plugin gradle extensions can append to this to have code run at the end.
cdvPluginPostBuildExtras = []
}
我的依赖项是
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile(project(path: "CordovaLib", configuration: "debug"))
releaseCompile(project(path: "CordovaLib", configuration: "release"))
compile "com.android.support:support-v4:24.1.1+"
compile "com.android.support:support-v4:+"
compile "com.android.support:appcompat-v7:+"
compile "com.google.android.gms:play-services-location:+"
compile "com.android.support:support-v13:23+"
compile "com.google.android.gms:play-services-gcm:11+"
compile "me.leolin:ShortcutBadger:1.1.14@aar"
// SUB-PROJECT DEPENDENCIES END
}
发布于 2018-06-04 01:49:26
cordova plugin add cordova-android-support-gradle-release --fetch --variable ANDROID_SUPPORT_VERSION=23.+ --save
这个插件解决了我的问题。
https://stackoverflow.com/questions/50667321
复制相似问题