为什么“这个应用程序的配置不正确"?某些手机​​出现错误? [英] Why "This app has been built with an incorrect configuration" error occured in some phones?

查看:29
本文介绍了为什么“这个应用程序的配置不正确"?某些手机​​出现错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 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'
  }
}

这篇关于为什么“这个应用程序的配置不正确"?某些手机​​出现错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆