Please configure your build for VectorDrawableCompat.
来源:互联网 发布:java json格式化输出 编辑:程序博客网 时间:2024/05/16 06:44
运行第一个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)运行程序,大功告成。
- Please configure your build for VectorDrawableCompat.
- Please configure your build for VectorDrawableCompat问题
- RuntimeException-- Please configure your build for VectorDrawableCompat问题
- 导入pullloadmorerecyclerview库出现错误:Please configure your build for VectorDrawableCompat
- 在导入com.android.support:design时的常见错误Please configure your build for VectorDrawableCompat
- This app has been built with an incorrect configuration. Please configure your build for VectorDra
- This app has been built with an incorrect configuration. Please configure your build for VectorDrawa
- This app has been built with an incorrect configuration. Please configure your build for VectorDrawa
- This app has been built with an incorrect configuration. Please configure your build for VectorDrawa
- This app has been built with an incorrect configuration. Please configure your build for VectorDrawa
- android真机测试报错:Please configure your build for VectorDrawa
- This app has been built with an incorrect configuration. Please configure your build for VectorDrawa
- This app has been built with an incorrect configuration. Please configure your build for VectorDra
- 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
- This app has been built with an incorrect configuration. Please configure your build for VectorDrawa
- Configure Your Build
- 安装PHPfailed---configure: error: build test failed. Please check the config.log for details
- Javase
- java根据GPS经纬度坐标计算两点的距离算法
- python中staticmethod classmethod及普通函数的区别
- 读Json文件转成字符串
- 微软2016校园招聘9月在线笔试题解
- Please configure your build for VectorDrawableCompat.
- Linux 内核进程管理之进程ID
- 1010. 一元多项式求导 (25)
- UCOSIII中断和时间管理
- String与StringBuffer之间的转换
- @RestController的使用
- 使用命令进行文件操作
- 剑指Offer:栈的压入、弹出序列
- 旋转卡壳