大佬教程收集整理的这篇文章主要介绍了android – 工具栏:IllegalStateException – 为VectorDrawableCompat配置你的构建,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
使用API 24预览content_main.xml时,一切都很好.在预览API 19时,我遇到以下渲染问题:
The following classes Could not be instantiated: - android.support.v7.widget.Toolbar java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat
classpath 'com.android.tools.build:gradle:2.1.2' **vectorDrawableS.UseSupportLibrary = true** buildToolsVersion "24.0.1" compile 'com.android.support:appcompat-v7:24.1.1' **compile "com.android.support:support-v4:24.1.1"** compile 'com.android.support:design:24.1.1
但仍然出现错误.我在互联网上找到了很多答案.但没有人帮助.使用API 19的新工具栏是否有问题?
android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.example.app" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" generatedDensities = [] } // This is handled for you by the 2.0+ Gradle Plugin aaPTOPtions { additionalParameters "--no-version-vectors" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro' } }
}
请注意以上代码:
// This is handled for you by the 2.0+ Gradle Plugin aaPTOPtions { additionalParameters "--no-version-vectors" }
和
generatedDensities = []
以上是大佬教程为你收集整理的android – 工具栏:IllegalStateException – 为VectorDrawableCompat配置你的构建全部内容,希望文章能够帮你解决android – 工具栏:IllegalStateException – 为VectorDrawableCompat配置你的构建所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。