Android Multidex and support libraries

Virtu

I am getting issue with when i enable multidex. I am using Android studio, i am getting "Could not find class" on DrawerLayoutWidget. Here is the setup

build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.0'
    defaultConfig {
        applicationId 'com.myapp'
        minSdkVersion 14
        targetSdkVersion 21
        multiDexEnabled true

    }


}

dependencies {

    compile 'com.android.support:appcompat-v7:21.+'
    compile 'com.android.support:support-v4:21.+'
}   

activity_main.xml

<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawerlayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">



    <FrameLayout
        android:id="@+id/frameContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

    </FrameLayout>

    <ListView
        android:id="@+id/drawerList"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:choiceMode="singleChoice"
        android:divider="@color/drawerListDivider"
        android:dividerHeight="0dp"        
        android:listSelector="@drawable/drawer_list_selector"
        android:background="@color/drawerListBackground"/>
</android.support.v4.widget.DrawerLayout>

This is my catlog error

12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 503: Landroid/support/v4/widget/ViewDragHelper;.smoothSlideViewTo (Landroid/view/View;II)Z
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0062
12-07 00:41:15.239    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.smoothSlideViewTo, referenced from method android.support.v4.widget.DrawerLayout.closeDrawer
12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 503: Landroid/support/v4/widget/ViewDragHelper;.smoothSlideViewTo (Landroid/view/View;II)Z
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0075
12-07 00:41:15.239    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.closeDrawers
12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x001c
12-07 00:41:15.239    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.DrawerLayout$ViewDragCallback.removeCallbacks, referenced from method android.support.v4.widget.DrawerLayout.closeDrawers
12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 318: Landroid/support/v4/widget/DrawerLayout$ViewDragCallback;.removeCallbacks ()V
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0071
12-07 00:41:15.239    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.computeScroll
12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0019
12-07 00:41:15.239    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.continueSettling, referenced from method android.support.v4.widget.DrawerLayout.computeScroll
12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 493: Landroid/support/v4/widget/ViewDragHelper;.continueSettling (Z)Z
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0030
12-07 00:41:15.239    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.dispatchOnDrawerClosed
12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0007
12-07 00:41:15.239    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.dispatchOnDrawerOpened
12-07 00:41:15.239    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.239    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0007
12-07 00:41:15.249    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.getEdgeSize, referenced from method android.support.v4.widget.DrawerLayout.drawChild
12-07 00:41:15.249    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 496: Landroid/support/v4/widget/ViewDragHelper;.getEdgeSize ()I
12-07 00:41:15.249    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x74 at 0x01a9
12-07 00:41:15.249    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.getEdgeSize, referenced from method android.support.v4.widget.DrawerLayout.drawChild
12-07 00:41:15.249    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 496: Landroid/support/v4/widget/ViewDragHelper;.getEdgeSize ()I
12-07 00:41:15.249    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x74 at 0x0251
12-07 00:41:15.249    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.findOpenDrawer
12-07 00:41:15.249    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.249    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0019
12-07 00:41:15.249    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.generateDefaultLayoutParams
12-07 00:41:15.249    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve new-instance 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.249    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0001
12-07 00:41:15.249    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.generateLayoutParams
12-07 00:41:15.249    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve new-instance 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.249    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0002
12-07 00:41:15.249    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.generateLayoutParams
12-07 00:41:15.249    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve instanceof 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.249    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x20 at 0x0003
12-07 00:41:15.249    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.getDrawerViewAbsoluteGravity
12-07 00:41:15.249    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.249    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0007
12-07 00:41:15.259    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.getDrawerViewOffset
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0007
12-07 00:41:15.259    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.isContentView
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0007
12-07 00:41:15.259    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.isDrawerOpen
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0035
12-07 00:41:15.259    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.isDrawerView
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0007
12-07 00:41:15.259    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.isDrawerVisible
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0035
12-07 00:41:15.259    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.DrawerLayout$DrawerLayoutCompatImpl.getTopInset, referenced from method android.support.v4.widget.DrawerLayout.onDraw
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve interface method 303: Landroid/support/v4/widget/DrawerLayout$DrawerLayoutCompatImpl;.getTopInset (Ljava/lang/Object;)I
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x72 at 0x0016
12-07 00:41:15.259    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.view.MotionEventCompat.getActionMasked, referenced from method android.support.v4.widget.DrawerLayout.onInterceptTouchEvent
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve static method 130: Landroid/support/v4/view/MotionEventCompat;.getActionMasked (Landroid/view/MotionEvent;)I
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0003
12-07 00:41:15.259    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.view.KeyEventCompat.startTracking, referenced from method android.support.v4.widget.DrawerLayout.onKeyDown
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve static method 126: Landroid/support/v4/view/KeyEventCompat;.startTracking (Landroid/view/KeyEvent;)V
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000f
12-07 00:41:15.259    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.onLayout
12-07 00:41:15.259    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.259    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0055
12-07 00:41:15.269    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.onMeasure
12-07 00:41:15.269    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.269    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x00eb
12-07 00:41:15.279    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$SavedState', referenced from method android.support.v4.widget.DrawerLayout.onRestoreInstanceState
12-07 00:41:15.279    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 107 (Landroid/support/v4/widget/DrawerLayout$SavedState;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.279    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0003
12-07 00:41:15.279    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$SavedState', referenced from method android.support.v4.widget.DrawerLayout.onSaveInstanceState
12-07 00:41:15.279    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve new-instance 107 (Landroid/support/v4/widget/DrawerLayout$SavedState;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.279    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0007
12-07 00:41:15.279    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.processTouchEvent, referenced from method android.support.v4.widget.DrawerLayout.onTouchEvent
12-07 00:41:15.279    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 499: Landroid/support/v4/widget/ViewDragHelper;.processTouchEvent (Landroid/view/MotionEvent;)V
12-07 00:41:15.279    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0007
12-07 00:41:15.289    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.openDrawer
12-07 00:41:15.289    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.289    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x003a
12-07 00:41:15.289    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.smoothSlideViewTo, referenced from method android.support.v4.widget.DrawerLayout.openDrawer
12-07 00:41:15.289    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 503: Landroid/support/v4/widget/ViewDragHelper;.smoothSlideViewTo (Landroid/view/View;II)Z
12-07 00:41:15.289    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0064
12-07 00:41:15.289    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.smoothSlideViewTo, referenced from method android.support.v4.widget.DrawerLayout.openDrawer
12-07 00:41:15.289    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 503: Landroid/support/v4/widget/ViewDragHelper;.smoothSlideViewTo (Landroid/view/View;II)Z
12-07 00:41:15.289    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x007d
12-07 00:41:15.289    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.cancel, referenced from method android.support.v4.widget.DrawerLayout.setDrawerLockMode
12-07 00:41:15.289    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 491: Landroid/support/v4/widget/ViewDragHelper;.cancel ()V
12-07 00:41:15.289    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0022
12-07 00:41:15.289    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.setDrawerLockMode
12-07 00:41:15.289    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.289    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x003c
12-07 00:41:15.299    4053-4053/com.myapplication E/dalvikvm﹕ Could not find class 'android.support.v4.widget.DrawerLayout$LayoutParams', referenced from method android.support.v4.widget.DrawerLayout.setDrawerViewOffset
12-07 00:41:15.299    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve check-cast 105 (Landroid/support/v4/widget/DrawerLayout$LayoutParams;) in Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.299    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x0008
12-07 00:41:15.299    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.content.ContextCompat.getDrawable, referenced from method android.support.v4.widget.DrawerLayout.setStatusBarBackground
12-07 00:41:15.299    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve static method 113: Landroid/support/v4/content/ContextCompat;.getDrawable (Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
12-07 00:41:15.299    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000c
12-07 00:41:15.299    4053-4053/com.myapplication I/dalvikvm﹕ Could not find method android.support.v4.widget.ViewDragHelper.getViewDragState, referenced from method android.support.v4.widget.DrawerLayout.updateDrawerState
12-07 00:41:15.299    4053-4053/com.myapplication W/dalvikvm﹕ VFY: unable to resolve virtual method 498: Landroid/support/v4/widget/ViewDragHelper;.getViewDragState ()I
12-07 00:41:15.299    4053-4053/com.myapplication D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0007
12-07 00:41:15.299    4053-4053/com.myapplication D/dalvikvm﹕ DexOpt: unable to opt direct call 0x0130 at 0x24 in Landroid/support/v4/widget/DrawerLayout;.<clinit>
12-07 00:41:15.299    4053-4053/com.myapplication D/dalvikvm﹕ DexOpt: unable to opt direct call 0x0131 at 0x31 in Landroid/support/v4/widget/DrawerLayout;.<clinit>
12-07 00:41:15.299    4053-4053/com.myapplication D/dalvikvm﹕ DexOpt: unable to opt direct call 0x012b at 0x12 in Landroid/support/v4/widget/DrawerLayout;.<init>
12-07 00:41:15.309    4053-4053/com.myapplication D/dalvikvm﹕ DexOpt: unable to opt direct call 0x013d at 0x55 in Landroid/support/v4/widget/DrawerLayout;.<init>
12-07 00:41:15.309    4053-4053/com.myapplication D/dalvikvm﹕ DexOpt: unable to opt direct call 0x013d at 0x62 in Landroid/support/v4/widget/DrawerLayout;.<init>
12-07 00:41:15.309    4053-4053/com.myapplication D/dalvikvm﹕ DexOpt: unable to opt direct call 0x012a at 0xc0 in Landroid/support/v4/widget/DrawerLayout;.<init>
12-07 00:41:15.359    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x0030 at 0x10 in Landroid/support/v4/widget/DrawerLayout;.onRestoreInstanceState
12-07 00:41:15.359    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x0030 at 0x16 in Landroid/support/v4/widget/DrawerLayout;.onRestoreInstanceState
12-07 00:41:15.359    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002e at 0x27 in Landroid/support/v4/widget/DrawerLayout;.onRestoreInstanceState
12-07 00:41:15.359    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002f at 0x2f in Landroid/support/v4/widget/DrawerLayout;.onRestoreInstanceState
12-07 00:41:15.369    4053-4053/com.myapplication D/dalvikvm﹕ DexOpt: unable to opt direct call 0x013b at 0x0d in Landroid/support/v4/widget/DrawerLayout;.onSaveInstanceState
12-07 00:41:15.369    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x0025 at 0x22 in Landroid/support/v4/widget/DrawerLayout;.onSaveInstanceState
12-07 00:41:15.369    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x0030 at 0x24 in Landroid/support/v4/widget/DrawerLayout;.onSaveInstanceState
12-07 00:41:15.369    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002e at 0x2a in Landroid/support/v4/widget/DrawerLayout;.onSaveInstanceState
12-07 00:41:15.369    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002f at 0x30 in Landroid/support/v4/widget/DrawerLayout;.onSaveInstanceState
12-07 00:41:15.379    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002a at 0x40 in Landroid/support/v4/widget/DrawerLayout;.openDrawer
12-07 00:41:15.379    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x0028 at 0x44 in Landroid/support/v4/widget/DrawerLayout;.openDrawer
12-07 00:41:15.379    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x0025 at 0x3e in Landroid/support/v4/widget/DrawerLayout;.setDrawerLockMode
12-07 00:41:15.379    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002a at 0x0d in Landroid/support/v4/widget/DrawerLayout;.setDrawerViewOffset
12-07 00:41:15.379    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002a at 0x16 in Landroid/support/v4/widget/DrawerLayout;.setDrawerViewOffset
12-07 00:41:15.379    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002a at 0x2d in Landroid/support/v4/widget/DrawerLayout;.updateDrawerState
12-07 00:41:15.379    4053-4053/com.myapplication I/dalvikvm﹕ DexOpt: unable to optimize instance field ref 0x002a at 0x5f in Landroid/support/v4/widget/DrawerLayout;.updateDrawerState
12-07 00:41:15.379    4053-4053/com.myapplication W/dalvikvm﹕ Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Landroid/support/v4/widget/DrawerLayout;
12-07 00:41:15.379    4053-4053/com.myapplication W/dalvikvm﹕ Class init failed in Constructor.constructNative (Landroid/support/v4/widget/DrawerLayout;)
12-07 00:41:15.379    4053-4053/com.myapplication D/AndroidRuntime﹕ Shutting down VM
12-07 00:41:15.379    4053-4053/com.myapplication W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41e7ac68)
12-07 00:41:15.379    4053-4053/com.myapplication E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.myapplication, PID: 4053
java.lang.NoClassDefFoundError: android.support.v4.widget.DrawerLayout$DrawerLayoutCompatImplBase
        at android.support.v4.widget.DrawerLayout.<clinit>(DrawerLayout.java:307)
        at java.lang.reflect.Constructor.constructNative(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at android.view.LayoutInflater.createView(LayoutInflater.java:594)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
        at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:343)
        at android.app.Activity.setContentView(Activity.java:1929)
        at com.myapplication.MainActivity.onCreate(MainActivity.java:58)
        at android.app.Activity.performCreate(Activity.java:5231)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
        at android.app.ActivityThread.access$800(ActivityThread.java:145)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5081)
        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:781)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
        at dalvik.system.NativeStart.main(Native Method)

I tried with various build tools version and support version. But i could not fix this error. But if I change multiDeskEnabled false then everything is working fine. So with multiDeskEnabled the same dependency is not working.

When i search for solution i found few suggestions to keep change the build order etc., which are related to Eclipse. But I could not find any solution for Android. Can any one help me to get rid of this issue?

g_pass

You are missing a number of extras that are required to make this work on <5.0 devices.

  1. You need this in your gradle dependencies: compile 'com.android.support:multidex:1.0.0'
  2. You need to change the application in the manifest to the multidex application, or override attachBaseContext() in your custom application class to call MutiDex.install(this) after the super.attachBaseContext(base);

You can see full docs for this here (maybe updated since you posted this) https://developer.android.com/tools/building/multidex.html#mdex-gradle . See the "Configuring Your App for Multidex with Gradle" section.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

android-support-multidex.jar在eclipse中不起作用

来自分类Dev

android-support-multidex.jar在eclipse中不起作用

来自分类Dev

在路径:DexPathList上找不到类“ android.support.multidex.MultiDexApplication”

来自分类Dev

无法将android.support.multidex.MultiDexApplication异常强制转换为类

来自分类Dev

java.lang.ClassNotFound:在路径:DexPathList上找不到类“ android.support.multidex.MultiDexApplication”

来自分类Dev

Android-MultiDex安装

来自分类Dev

Android Multidex RuntimeException

来自分类Dev

android multidex实现

来自分类Dev

错误:从 minSdkVersion 16 升级到 minSdkVersion 23 时,包 android.support.multidex 不存在

来自分类Dev

Android支持multidex库实现

来自分类Dev

Android Gradle插件multidex ZipException

来自分类Dev

Android gradle plugin multidex ZipException

来自分类Dev

Android Multidex和支持库

来自分类Dev

Android Multidex list all classes

来自分类Dev

Android:巨型模式与Multidex

来自分类Dev

Multidex是否支持Android Studio?

来自分类Dev

Android Multidex列出所有类别

来自分类Dev

使用eclipse的Android multidex支持库

来自分类Dev

Android MultiDex-内部工作问题

来自分类Dev

Gradle中的Android Studio 1.3 multidex错误

来自分类Dev

Android Studio Multidex和Ndk问题

来自分类Dev

Android 如何检查 .apk 是否使用 Multidex?

来自分类Dev

Android Studio 无法解决:multidex Open File

来自分类Dev

Android Studio更新到1.0破坏了MultiDex

来自分类Dev

gradle-Android Studio构建太慢的multidex应用程序

来自分类Dev

Android应用程序中的MultiDex支持错误

来自分类Dev

带有Firebase消息传递api的android multidex支持

来自分类Dev

Android multidex,UnsatisfiedLinkError-找不到.so文件

来自分类Dev

Android Studio更新至1.0破坏了MultiDex

Related 相关文章

  1. 1

    android-support-multidex.jar在eclipse中不起作用

  2. 2

    android-support-multidex.jar在eclipse中不起作用

  3. 3

    在路径:DexPathList上找不到类“ android.support.multidex.MultiDexApplication”

  4. 4

    无法将android.support.multidex.MultiDexApplication异常强制转换为类

  5. 5

    java.lang.ClassNotFound:在路径:DexPathList上找不到类“ android.support.multidex.MultiDexApplication”

  6. 6

    Android-MultiDex安装

  7. 7

    Android Multidex RuntimeException

  8. 8

    android multidex实现

  9. 9

    错误:从 minSdkVersion 16 升级到 minSdkVersion 23 时,包 android.support.multidex 不存在

  10. 10

    Android支持multidex库实现

  11. 11

    Android Gradle插件multidex ZipException

  12. 12

    Android gradle plugin multidex ZipException

  13. 13

    Android Multidex和支持库

  14. 14

    Android Multidex list all classes

  15. 15

    Android:巨型模式与Multidex

  16. 16

    Multidex是否支持Android Studio?

  17. 17

    Android Multidex列出所有类别

  18. 18

    使用eclipse的Android multidex支持库

  19. 19

    Android MultiDex-内部工作问题

  20. 20

    Gradle中的Android Studio 1.3 multidex错误

  21. 21

    Android Studio Multidex和Ndk问题

  22. 22

    Android 如何检查 .apk 是否使用 Multidex?

  23. 23

    Android Studio 无法解决:multidex Open File

  24. 24

    Android Studio更新到1.0破坏了MultiDex

  25. 25

    gradle-Android Studio构建太慢的multidex应用程序

  26. 26

    Android应用程序中的MultiDex支持错误

  27. 27

    带有Firebase消息传递api的android multidex支持

  28. 28

    Android multidex,UnsatisfiedLinkError-找不到.so文件

  29. 29

    Android Studio更新至1.0破坏了MultiDex

热门标签

归档