【问题标题】:Getting following error while performing the android build?执行 android 构建时出现以下错误?
【发布时间】:2018-11-13 00:09:05
【问题描述】:

\platforms\android\build\intermediates\res\merged\debug\values-v28\values-v28.xml:7:41-73: AAPT: 找不到与给定名称匹配的资源(在 'dialogCornerRadius'值'?android:attr/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

}

【问题讨论】:

    标签: android angular cordova ionic2


    【解决方案1】:
    cordova plugin add cordova-android-support-gradle-release --fetch --variable ANDROID_SUPPORT_VERSION=23.+ --save
    

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-15
      • 2016-03-11
      • 2020-06-25
      • 2019-03-31
      • 1970-01-01
      • 2021-02-26
      • 2015-11-16
      相关资源
      最近更新 更多