运行第一个Android Stdio程序就出现下面这个问题,由于对Android Stdio不熟悉整了三个小时才解决,希望这篇博客能帮助更多的人。

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

原因:Android 插件版本不兼容,需要gradle 2.0以上。

解决方法:

(1)将build.gradle中的版本改为2.0.0,如下图红框所示。

(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:\RX\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip

(3)此刻我们需要修改你的项目下的 \gradle\wrapper\gradle-wrapper.properties文件,将Gradle的版本改为2.10,如下图所示:

(4)点击工具栏上的File->Settings...->Build,Execution,Deployment->Build Tools->Gradle,查看Gradle home的路径是否是gradle-2.10,如果是则就可以运行程序了。

如果不是gradle-2.10,但已经下载了gradle-2.10.zip,将路径指向它,然后就可以运行程序了。

如果没下载,则需要下载gradle-2.10.zip,点击android stdio下面的Terminal,输入gradlew回车,android stdio会自动下载gradle-2.10.zip,如下图所示:

下载的gradle-2.10.zip会被保存到C:\Users\name.xing\.gradle\wrapper\dists\gradle-2.10-all\a4w5fzrkeut1ox71xslb49gst\gradle-2.10

需要将gradle-2.10复制到android stdio安装路径的gradle目录下,最后点击工具栏上的File->Settings...->Build,Execution,Deployment->Build Tools->Gradle,将Gradle home的路径修改为gradle-2.10的路径。

(5)运行程序,大功告成。

AS错误:Please configure your build for VectorDrawableCompat.的更多相关文章

  1. 使用环信开发项目遇到错误提示 configure your build for VectorDrawableCompat

    问题描述:在使用AndroidStudio开发项目时,使用环信重写了聊天界面后,运行时app就崩掉了,查看日志报告,提示报错如下: java.lang.RuntimeException: Unable ...

  2. Android gradle问题解决: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat

    1. 问题描述: Android Studio在运行模拟器某些机型或者真机某些机型的时候发生闪退. 错误如下: Java.lang.RuntimeException: Unable to start ...

  3. Linux安装imagick扩展出现错误:configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.

    在Linux(CentOS)上安装imagick扩展时,遇到如下错误: checking ImageMagick MagickWand API configuration program... che ...

  4. VS2013下开发VC++程序,编译时提示错误error MSB8020: The build tools for v140 (Platform Toolset = 'v140') 的解决方案

    1. 问题描述: 提示如下错误:error MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found ...

  5. Android Studio 小新兵

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

  6. 【记录】Nginx错误could not build the server_names_hash you should increase server_names_hash_bucket_size: 32

    今天遇到这个错误,现记录下解决方案: 在nginx的配置文件的http段中增加如下配置: server_names_hash_bucket_size 64; 下面是nginx官方文档解释: 如果定义了 ...

  7. ARM64平台编译stream、netperf出错解决办法 解决办法:指定编译平台为alpha [root@localhost netperf-2.6.0]# ./configure –build=alpha

    ARM64平台编译stream.netperf出错解决办法 http://ilinuxkernel.com/?p=1738 stream编译出错信息: [root@localhost stream]# ...

  8. linux下编译qt5.6.0静态库——configure配置

    linux下编译qt5.6.0静态库 linux下编译qt5.6.0静态库 configure生成makefile 安装选项 Configure选项 第三方库: 附加选项: QNX/Blackberr ...

  9. 安装postgreSQL出现configure:error:readline library not found解决方法

    要安装 readline , readline-dev 开发包,要么使用 --without-readline 选项关闭 readline 功能. #yum install readline; #yu ...

随机推荐

  1. 怎样用JS获取ASP.NET服务器控件的客户端ID

    虽然简单,不过曾经困扰多时,还是记录一下吧. 来源:http://mou518.blog.163.com/blog/static/1756052222010111434428828/ 因为经常服务器控 ...

  2. python之类的属性

    class type(object) With one argument, return the type of an object. The return value is a type objec ...

  3. [转]Could not load file or assembly 'System.Core, Version=2.0.5.0 和autofac冲突的问题

    Could not load file or assembly 'System.Core, Version=2.0.5.0 和autofac冲突的问题 来源:http://www.cnblogs.co ...

  4. C#:安装Windows服务,动态指定服务名及描述

    Installer.cs>> public Installer() { InitializeComponent(); /* 服务未注册前,System.Configuration.Conf ...

  5. access remote libvirtd

    访问远程libvirtd服务因为是在一个可信环境中运行,所以可以忽略安全方面的操作,步骤如下:(1)更改libvirtd配置    1.1 更改/ect/sysconfig/libvirtd文件,打开 ...

  6. [MongoDB] 高可用架构方案

    一.缘由: 众所周知,Mongodb是在高速发展期,一些特性架构难免会发生变化.这里就总结下,我目前所知道的Mongodb 的高可用架构都有哪些.目前Mongodb版本3.2. 二.结构介绍: 1.R ...

  7. DOM节点访问

    简而言之,DOM(即文档对象模型)是一种将XML或HTML文档解析成树形节点的方法.通过DOM的方法与属性,我们就可以访问到页面中的任何元素,并进行元素的修改.删除以及添加的操作.同时,DOM也是一套 ...

  8. search-a-2d-matrix(二维矩阵查找)

    Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the follo ...

  9. bootstrap-面板、modal

    面板: <!-- panel 面板 panel-heading 面板头部 panel-title 面板标题样式 panel-body 面板内容 --> <div class=&quo ...

  10. 24. Longest Consecutive Sequence

    Longest Consecutive Sequence Given an unsorted array of integers, find the length of the longest con ...