0
以下是我的Gradle文件。它在棉花糖上工作,但它不适用于KitKat 4.2.2。它在Kitkat上运行时会返回以下错误。E/VdcInflateDelegate:org.xmlpull.v1.XmlPullParserException:二进制XML文件行#17 <vector> tag requires viewportWidth> 0
Exception while inflating <vector>
12-21 17:45:46.235 12303-12303/com.xyz.packagename E/VdcInflateDelegate: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17<vector> tag requires viewportWidth > 0
AppCompact不支持该应用程序。如果我使用Activity而不是Appcompact,那么它工作正常,但我需要使用AppCompact,因为Material Design Things的集成。
apply plugin: 'com.android.application'
android
{
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig
{
applicationId "com.xyz.projectName"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes
{
release
{
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies
{
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// multidex
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
// Map
//compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.maps.android:android-maps-utils:0.3+'
//Firebase
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
}
apply plugin: 'com.google.gms.google-services'
请帮忙。
变化'buildToolsVersion “25.0.2” '这个'buildToolsVersion“25.1.0”'。 – Ironman
[更新Android支持库到23.2.0的可能的重复错误:XmlPullParserException二进制XML文件行#17标记需要viewportWidth> 0](http://stackoverflow.com/questions/35622438/update-android-support-library -to-23-2-0-cause-error-xmlpullparserexception-bin) –
我已经尝试了@IronMan和@ Saeed Zhiany给出的两种解决方案,但仍然出现同样的错误。 –