I´m trying to get SVGs on an older API, but when I start the activity where the SVG is located, the app brokes. It is working on a 6.0 device, but not on 4.2.2
it comes with
android.view.InflateException: Binary XML file line #21: Error inflating class ImageView
I imported the SVG with the Android Vector Asset, also with this one http://inloop.github.io/svg2android/ But it doesen´t make a different.
This is how I call the 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" />
my gradle:
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.+'
}
Does anybody has a clue? Thanks a lot!!