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

标签: 运行出错 Please configure you gradle 2.0 解决方案 android
1888人阅读 评论(0) 收藏 举报
分类:

我相信很多朋友在辛辛苦苦的开发后,明明自己手机可以正常安装与运行,但是总有那么些用户是运行不行的,开始的时候我也纳闷了好久,因为没有用户的那款手机型号,都不知道报的什么错,也无法对症下药,愁了好几天,今天突然试试虚拟机,结果这种问题居然呈现了。相信很多开发朋友也和我一样,不怕有错,就怕没有错吧,等上线后一堆的错,简直不能忍。


特征:正常安装,不能运行

报错:Caused by:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.rx/com.test.zh.MainActivity}: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.

翻译:这个应用程序已经建立了一个不正确的配置。请配置您的构建vectordrawablecompat。


其实吧,原因是:Android 插件版本不兼容,需要gradle 2.0以上就可以了 。




解决方案:
(1)将build.gradle中的版本改为2.0.0,如下图所示。
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
//        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.android.tools.build:gradle:2.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

(2)选择工具栏上的Tools->Android->Sync Project with Gradle Files,同步一下Gradle, 此时会在控制台出错如下错误:

Warning:Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in E:\ZH\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip


(3)根据指出的路径找到\gradle\wrapper\gradle-wrapper.properties文件,将Gradle的版本改为2.10-all,如下图所示:


#Wed Oct 21 11:34:03 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip


(4)重新编译运行,就可以正常使用了


查看评论

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

问题描述:新建了一个android工程,生成的gradle中的内容是android { compileSdkVersion 24 buildToolsVersion "23.0.3" ...
  • nicolelili1
  • nicolelili1
  • 2016-07-26 15:10:39
  • 8101

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

运行apk后的异常是: 07-26 14:23:27.882: E/AndroidRuntime(8517): Java.lang.RuntimeException: Unable to...
  • duoluo9
  • duoluo9
  • 2016-11-16 11:25:30
  • 153

Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration.

apply plugin: 'com.android.application' android { compileSdkVersion 24 buildToolsVersion "2...
  • zhuhai__yizhi
  • zhuhai__yizhi
  • 2016-10-09 10:49:07
  • 2647

RuntimeException-- Please configure your build for VectorDrawableCompat问题

问题描述:新建了一个android工程,生成的gradle中的内容是   问题:Caused by:Java.lang.RuntimeException: Unable to...
  • u011200604
  • u011200604
  • 2016-10-26 09:44:55
  • 1537

关于安装BlueStacks(蓝手指Android模拟器)失败的问题

今天在启动BlueStacks时,显示异常并退出。 接着启动给力助手,并且安装最新版本的蓝手指模拟kk...
  • zhuobattle
  • zhuobattle
  • 2014-04-08 16:49:39
  • 8394

Linux下编译PHP常见错误及解决方法

PHP的安装虽然有时候很简单,可是如果应用一多,我们安装起来就很头痛了!出错最多的就是安装PHP扩展的时候了。其实不管是你是Apache类的应用还是Nginx类的,PHP的安装都不是很简单,虽然网上有...
  • pz_winner
  • pz_winner
  • 2017-10-30 15:00:42
  • 582

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

This app has been built with an incorrect configuration. Please configure your build for VectorDrawa...
  • liulinghuidage
  • liulinghuidage
  • 2016-12-23 14:42:22
  • 380

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

This app has been built with an incorrect configuration. Please configure your build for VectorDraw...
  • A13428103432
  • A13428103432
  • 2017-03-23 18:15:18
  • 597

It seems that this file has not been built yet.Do you want to build it now? Codeblocks能构建build不能运run

安装codeblocks之后编写了一个简单程序不能运行,弹出提示框 It seems that this file has not been built yet.Do you want to bui...
  • LEE18254290736
  • LEE18254290736
  • 2015-12-20 13:23:18
  • 6989

java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please co

java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please con...
  • android_yck
  • android_yck
  • 2017-11-08 16:24:00
  • 80
    个人资料
    等级:
    访问量: 4万+
    积分: 320
    排名: 24万+
    最新评论
    底部跑马灯