Closed thefullhorizon closed 7 years ago
Hi there. Could you post a full stacktrace of the error?
After searching for a while on the stackoverflow, the possible issue, I think, could be the compatibility of NavigationView. On Android API 5.0.0 it ran ok ,while it failed on Android API 4.4.4. It functioned well on both API version above when i replaced NavigationView with a general Layout such as LinearLayout . I ran the demo of ArcNavigationView, it functioned well on both Android API 5.0.0 and Android API 4.4.4. So i guess the possible issue could be the settings of my project. Well, could you give me some suggestions.
03-18 18:09:38.575 27885-27885/com.nanshanstudio.dispalymd I/InstantRun: Instant Run Runtime started. Android package is com.nanshanstudio.dispalymd, real application class is null.
03-18 18:09:38.580 27885-27885/com.nanshanstudio.dispalymd W/InstantRun: No instant run dex files added to classpath
03-18 18:09:38.620 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
03-18 18:09:38.620 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve interface method 21420: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
03-18 18:09:38.620 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
03-18 18:09:38.620 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
03-18 18:09:38.620 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve interface method 21422: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
03-18 18:09:38.625 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
03-18 18:09:38.625 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve interface method 21426: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
03-18 18:09:38.625 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
03-18 18:09:38.625 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve virtual method 726: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
03-18 18:09:38.625 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
03-18 18:09:38.625 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve virtual method 748: Landroid/content/res/TypedArray;.getType (I)I
03-18 18:09:38.710 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm-heap: Grow heap (frag case) to 39.016MB for 11933268-byte allocation
03-18 18:09:38.780 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
03-18 18:09:38.780 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve virtual method 689: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-18 18:09:38.780 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
03-18 18:09:38.780 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve virtual method 691: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-18 18:09:38.785 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
03-18 18:09:38.785 27885-27885/com.nanshanstudio.dispalymd W/dalvikvm: VFY: unable to resolve virtual method 455: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
03-18 18:09:41.035 27885-27885/com.nanshanstudio.dispalymd I/dalvikvm: Could not find method android.widget.FrameLayout.
<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/navigation_drawer" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/colorPrimary">
<include
android:id="@+id/tv_content"
layout="@layout/drawer_content"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.rom4ek.arcnavigationview.ArcNavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"
app:itemBackground="@android:color/white"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer"
app:arc_cropDirection="cropInside"
app:arc_width="96dp"/>
//the layout refer to LinearLayout
<include
layout="@layout/drawer_menu_right"
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_gravity="start" />
<include
layout="@layout/drawer_menu_right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end" />
</android.support.v4.widget.DrawerLayout>
As you can see from the log, you have problems with Instant Run. So try to disable it, and then run, or try to update gradle/android studio version. I will close the issue as it's not relevant to my library.
When i integrate the code to my project as the usage , then run on a real phone. then the android studio showed me this: E/dalvikvm: Could not find class 'com.rom4ek.arcnavigationview.ArcNavigationView$1', referenced from method com.rom4ek.arcnavigationview.ArcNavigationView.calculateLayoutAndChildre It makes me being at sea , could give me some suggestions