gpt4 book ai didi

android - 为什么有些手机出现 "This app has been built with an incorrect configuration"错误?

转载 作者:IT老高 更新时间:2023-10-28 23:29:02 36 4
gpt4 key购买 nike

我已经在 android 6 中构建了我的应用程序,没有任何错误,但是当我在 android 4.4.2 中构建我的应用程序时,我得到了这个错误

This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.

and this is my gradle:

android {
compileSdkVersion 24
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.faranegar.channel"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

注意:当我设置 compileSdkVersion 23 时,一切都很好,没有任何错误。

最佳答案

这对我很有效

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.example.app"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
generatedDensities = []
}

// This is handled for you by the 2.0+ Gradle Plugin
aaptOptions {
additionalParameters "--no-version-vectors"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

在上面的代码中注意这一点:

// This is handled for you by the 2.0+ Gradle Plugin
aaptOptions {
additionalParameters "--no-version-vectors"
}

generatedDensities = []

更新

如果此 generatedDensities = [] 显示已弃用,请改用以下内容。

vectorDrawables.generatedDensities = []

希望对你有帮助

关于android - 为什么有些手机出现 "This app has been built with an incorrect configuration"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38143867/

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