gpt4 book ai didi

android - E/VdcInflateDelegate:org.xmlpull.v1.XmlPullParserException:二进制XML文件行#17 标签需要viewportWidth> 0

转载 作者:行者123 更新时间:2023-12-03 05:12:52 25 4
gpt4 key购买 nike

以下是我的Gradle文件。它可以在棉花糖上工作,但不能在KitKat 4.2.2上工作。当我在Kitkat上运行它时,它返回以下错误。

 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'

请帮忙。

最佳答案

通过添加以下行对我来说效果很好

aaptOptions {
AdditionalParameters“--no-version-vectors”
}

  apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"


defaultConfig {
applicationId "com.xyz.project name"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
/* vectorDrawables.useSupportLibrary = true
generatedDensities = []*/
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

// important to run code on kitkat

aaptOptions {
additionalParameters "--no-version-vectors"
}
}

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'

// ImageLoader
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

// 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+'

// Spinner
compile 'com.jaredrummler:material-spinner:1.1.0'

// Volley
compile 'com.android.volley:volley:1.0.0'

//Firebase
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'

//CropImage
compile project(':CropImage')

}
apply plugin: 'com.google.gms.google-services'

关于android - E/VdcInflateDelegate:org.xmlpull.v1.XmlPullParserException:二进制XML文件行#17 <vector>标签需要viewportWidth> 0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41275721/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com