1

App funktioniert gut auf anderen Geräten außer nur Samsung-Gerät (Android 4.2 und 4.4 kitkat), Galaxygrand, Core Prime usw.Fehler beim Aufblasen der Klasse android.support.design.widget.NavigationView, Fehler auf Samsung Gerät erhalten Nur,

Ich verwende Appcompact NavigationView aus der Design-Support-Bibliothek.

dependencies { 
    compile 'com.flurry.android:analytics:6.2.0' 

    compile project.COMPILE_APPCOMPACT_VERSION 
    // Support Libraries 
    compile 'com.android.support:cardview-v7:23.0.1' 
    compile 'com.android.support:design:23.0.1' 
// compile 'com.android.support:gridlayout-v7:23.0.1' 
// compile 'com.android.support:leanback-v17:23.0.1' 
    compile 'com.android.support:mediarouter-v7:23.0.1' 
    compile 'com.android.support:palette-v7:23.0.1' 
    compile 'com.android.support:recyclerview-v7:23.0.1' 
    compile 'com.android.support:support-annotations:23.0.1' 
// compile 'com.android.support:support-v13:23.0.1' 
    compile 'com.android.support:support-v4:23.0.1' 



<android.support.design.widget.NavigationView 
     android:id="@+id/main_nav_view" 
     android:layout_width="wrap_content" 
     android:layout_height="match_parent" 
     android:layout_gravity="start" 
     android:fitsSystemWindows="true" 
     app:headerLayout="@layout/nav_header_main" 
     app:itemTextColor="@drawable/drawer_item" 
     app:menu="@menu/activity_main_drawer" 
     app:theme="@style/NavigationDrawerStyle" /> 

der Fehler

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.manish.indiancallerdetail/com.manish.indiancallerdetail.ui.MainActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464) 
    at android.app.ActivityThread.access$900(ActivityThread.java:172) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:146) 
    at android.app.ActivityThread.main(ActivityThread.java:5653) 
    at java.lang.reflect.Method.invokeNative(Native Method) 
    at java.lang.reflect.Method.invoke(Method.java:515) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 
    at dalvik.system.NativeStart.main(Native Method) 
Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView 
    at android.view.LayoutInflater.createView(LayoutInflater.java:626) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:498) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:398) 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:354) 
    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(SourceFile:255) 
    at android.support.v7.app.AppCompatActivity.setContentView(SourceFile:109) 
    at com.manish.indiancallerdetail.ui.common.BaseAppCompActivity.setContentView(SourceFile:85) 
    at com.manish.indiancallerdetail.ui.MainActivity.onCreate(SourceFile:85) 
    at android.app.Activity.performCreate(Activity.java:5541) 
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368) 
    ... 11 more 
Caused by: java.lang.reflect.InvocationTargetException 
    at java.lang.reflect.Constructor.constructNative(Native Method) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:600) 
    ... 23 more 
Caused by: android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x5/d=0x1001 a=2 r=0x105002b} 
    at android.content.res.Resources.loadColorStateList(Resources.java:3532) 
    at android.content.res.TypedArray.getColorStateList(TypedArray.java:343) 
    at android.support.design.widget.NavigationView.<init>(SourceFile:119) 
    at android.support.design.widget.NavigationView.<init>(SourceFile:92) 
    ... 26 more 

`` `

+0

Ich glaube, es ist 'Appcompat' (nicht" Pakt "), falls es hilft. – DarkCygnus

+0

@Manish - Hast du irgendwelche Lösungen dafür bekommen ?? – Manish

Antwort

0

Sie sollten Ihre Support-Bibliothek aktualisieren.

Neueste com.android.support Version ist 23.4.0, siehe here.

compile 'com.android.support:cardview-v7:23.4.0' 
    compile 'com.android.support:design:23.4.0' 
// compile 'com.android.support:gridlayout-v7:23.4.0' 
// compile 'com.android.support:leanback-v17:23.4.0' 
    compile 'com.android.support:mediarouter-v7:23.4.0' 
    compile 'com.android.support:palette-v7:23.4.0' 
    compile 'com.android.support:recyclerview-v7:23.4.0' 
    compile 'com.android.support:support-annotations:23.4.0' 
// compile 'com.android.support:support-v13:23.4.0' 
    compile 'com.android.support:support-v4:23.4.0' 
+0

Nicht funktionierende Kumpel ... :( –

Verwandte Themen