问题描述:新建了一个android工程,生成的gradle中的内容是
android { compileSdkVersion 24 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.test.rx" minSdkVersion 7 targetSdkVersion 24 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }
运行apk后的异常是:
07-26 14:23:27.882: E/AndroidRuntime(8517): 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.
07-26 14:23:27.882: E/AndroidRuntime(8517): Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.
07-26 14:23:27.882: E/AndroidRuntime(8517): atAndroid.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.jar
产生的原因是:com.android.support:appcompat-v7与rasterized vectors不兼容,gradle2.0及其之上,library的资源没有栅格化,所以不会发生这个问题
解决方法:
1.在projectgradle中将gradle版本改为2.0或者之上
dependencies { 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.此时控制台输出异常: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
按照路径所指出的地址,找到文件gradle-wrapper.properties,编辑最后一句版本号为日志中所输出的版本
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
重新运行并安装就可以了
相关推荐
./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr make sudo make install ``` 6. **启动httpd**:安装完成后,你可以启动httpd服务,测试是否成功: ```bash sudo /usr/local/apache2/bin/...
利用python可以非常方便的实现邮件发送。代码也非常好理解。 思路分三大块: ...编辑邮件内容 发送 正确的代码实现 import smtplib from email.mime.text import MIMEText ...sent.login(mail_name, mail_password) # 登
错误消息“An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)”直译为“尝试加载格式不正确的程序”,这是指处理器架构不匹配导致的问题。 在C# WinForm应用...
This has been corrected. Release 5.3 build 1020 WIN32 release 29 May 2008 - BurnInTest could have crashed on accessing bad video memory hardware in the 2D test. This problem is now just reported ...
Linux中vsftpd 530 Login incorrect 解决方案 在 Linux 系统中,ftp 服务器是一种常用的文件传输协议服务器,而 vsftpd 是一个功能强大且广泛使用的 ftp 服务器软件。但是,在使用 vsftpd 的过程中,经常会遇到 530...
Find the Bug A Book of Incorrect Programs.chm
用cubesuite烧写器报下列错误: [Direct Error Cause] Incorrect ID Code.(C0602202)
This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at ...
Subversion binary is incorrect version.found:1.11.1,required:1.3.0
2.3.13 Cover your Bugfix with a Regression Test . . . . . 13 2.4 Build a Good Toolkit . . . . . . . . . . . . 14 2.4.1 Your Workshop . . . . . . . . . 15 2.4.2 Running Tests Every Day Keeps the Bugs ...
错误解决 用cubesuite烧写器报下列错误: [Direct Error Cause] Incorrect ID Code.(C0602202)错误解决。 用cubesuite烧写器报下列错误: [Direct Error Cause] Incorrect ID Code.(C0602202) 瑞萨 [Direct Error ...
prerequisite patches in an unstable way, which has been updated to compute in a way that is compatible with "git patch-id --stable". * The "git log" command by default behaves as if the --mailmap ...
incorrect SPI configuration(解决方案).md
incorrect bus configuration(解决方案).md
1. Fixed an issue where tag names that contained non-ascii characters but started with an ascii character would cause the parser to get stuck in an infinite loop. 2. Fixed an issue where API created ...
incorrect watchdog timer configuration(解决方案).md
incorrect. There is no WORDCNT.PRJ file; all you need to do is load the file WORDCNT.C into the editor. Once you have done that, the rest of the instructions are correct. 5. ADDITIONAL NOTES ----...
在0.7.1这个版本中,StatsVN不仅带来了新的特性,更关键的是,它解决了上一版本0.7.0中的重要问题,尤其是那个困扰用户的"Subversion binary is incorrect version. Found"错误。 首先,让我们深入了解一下这个错误...
参考"解决问题:libpng warning: iCCP: known incorrect sRGB profile"[https://blog.csdn.net/WangJiankun_ls/article/details/79470739]文章,通过自己实践操作,得出结论,希望能帮助到你们
This book contains chapters with small code examples built with the Angular CLI. You’ll be able to try out code without being burdened by setting up a large project. I did it this way because I found...