我正在尝试在较旧的API上获取SVG,但是当我启动SVG所在的活动时,应用程序会破解。它正在使用6.0设备,但不适用于4.2.2
它附带
android.view.InflateException:二进制XML文件行#21:错误导致类ImageView
我使用Android Vector Asset导入了SVG,也使用了这个http://inloop.github.io/svg2android/ 但它不会有所不同。
这就是我称之为SVG的方式:
<ImageView
android:layout_width="wrap_content"
android:layout_height="50dp"
android:id="@+id/imageView4"
android:layout_centerHorizontal="true"
android:src="@drawable/map2"
android:layout_alignParentTop="true" />
我的朋友:
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.example.jendrik.moerder"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.+'
compile 'com.android.support:support-v4:23.2.+'
compile 'com.android.support:percent:23.2.+'
compile 'com.android.support:design:23.2.+'
compile 'com.android.support:recyclerview-v7:23.2.+'
}
有人有线索吗? 非常感谢!!