首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在执行android构建时遇到以下错误?

在执行android构建时遇到以下错误?
EN

Stack Overflow用户
提问于 2018-06-03 22:15:04
回答 1查看 78关注 0票数 -2

对话框\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文件是这样的。

代码语言:javascript
复制
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 = []

}

我的依赖项是

代码语言:javascript
复制
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

}

EN

回答 1

Stack Overflow用户

发布于 2018-06-04 01:49:26

代码语言:javascript
复制
cordova plugin add cordova-android-support-gradle-release --fetch --variable ANDROID_SUPPORT_VERSION=23.+ --save

这个插件解决了我的问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50667321

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档