問題描述
我已經在 android 6 中構建了我的應用程序,沒有任何錯誤,但是當我在 android 4.4.2 中構建我的應用程序時,我得到了這個錯誤
<上一頁>此應用程序是使用不正確的配置構建的.請為 VectorDrawableCompat 配置您的構建.這是我的畢業作品:
<代碼>android {compileSdkVersion 24構建工具版本23.0.0"默認配置 {applicationId "com.faranegar.channel"minSdkVersion 11targetSdkVersion 23版本代碼 1版本名稱1.0"}構建類型 {發布 {縮小啟用假proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}}}
注意:當我設置 compileSdkVersion 23 時,一切都很好,沒有任何錯誤.
此問題已在此處報告 問題 214182:appcompat-v7 24.0.0 與光柵化矢量不兼容.
其中一位開發者提到:
<塊引用>您使用的是什么版本的 Gradle 插件?
從 Gradle 插件 v2.0 開始,庫資源永遠不會光柵化,所以這永遠不會發生.
解決方法是按照此官方鏈接更新您的 Gradle.Android Plugin for Gradle 發行說明.
buildscript {...依賴{類路徑'com.android.tools.build:gradle:2.1.0'}}
I Have build my app in android 6 without any error, but when I build my app in android 4.4.2 I get this error
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'
}
}
}
note: when I set compileSdkVersion 23, every thing is fine and there isn't any error.
This issue was alread reported here Issue 214182: appcompat-v7 24.0.0 is incompatible with rasterized vectors.
One of the developer mention:
What version of the Gradle plugin are you using?
As of v2.0 of the Gradle plugin, library resources are never rasterized so this should never happen.
The workaround for this is to update your Gradle by following this official link. Android Plugin for Gradle Release Notes.
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
這篇關于為什么“這個應用程序的配置不正確"?某些手機??出現錯誤?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!