06-27 11:53:32.216 6766-6766/E/AndroidRuntime: FATAL EXCEPTION: main
Process: PID: 6766
java.lang.NoClassDefFoundError: android.support.graphics.drawable.VectorDrawableCompat
at android.support.v7.widget.AppCompatDrawableManager$VdcInflateDelegate.createFromXmlInner(AppCompatDrawableManager.java:891)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:356)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:192)
at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)
at android.support.v7.app.AppCompatDelegateImplBase$ActionBarDrawableToggleImpl.getThemeUpIndicator(AppCompatDelegateImplBase.java:146)
at android.support.v7.app.ActionBarDrawerToggle.getThemeUpIndicator(ActionBarDrawerToggle.java:466)
at android.support.v7.app.ActionBarDrawerToggle.<init>(ActionBarDrawerToggle.java:226)
at android.support.v7.app.ActionBarDrawerToggle.<init>(ActionBarDrawerToggle.java:181)
at onCreate(MainActivity.java:88)
at Dashboard.onCreate(Dashboard.java:51)
at android.app.Activity.performCreate(Activity.java:5937)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
-2
A
Antwort
1
allererst die Abhängigkeiten zu
änderncompile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
und und verwenden Sie diesen Code innerhalb der Aktivität, die die Vektoren verwendet.
static { AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); }
0
einfach die folgende dependancy in Ihrem build.gradle hinzuzufügen. Das wird dein Problem beheben. Ich verwende 25.0.2 buildToolsVersion.
compile 'com.android.support:support-vector-drawable:25.3.0'