J'essaie d'implémenter la bibliothèque Vector Drawable. J'ai mis à jour mon code comme ci-dessous mais j'ai rencontré un nouveau problème. Maintenant, les images/vecteur ne montrent pas du tout.Les vecteurs ne s'affichent pas du tout après l'activation et l'utilisation de la bibliothèque Vector Drawable
Gradle fichier
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.kanudo.ten"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
}
Mise en page Fichier
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/imageView"
app:srcCompat="@drawable/ic_note_outlines"
android:layout_width="24dp"
android:layout_height="24dp" />
</RelativeLayout>
Merci