- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在启用 multidex 时遇到问题。我正在使用 Android Studio,我在 DrawerLayoutWidget 上收到“找不到类”。这是设置
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>
这是我的目录错误
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)
我尝试了各种构建工具版本和支持版本。但我无法修复此错误。但是,如果我将 multiDeskEnabled 更改为 false,则一切正常。因此,对于 multiDeskEnabled,相同的依赖项不起作用。
当我搜索解决方案时,我发现很少有关于保持更改构建顺序等的建议,这些建议与 Eclipse 相关。但我找不到任何适用于 Android 的解决方案。谁能帮我解决这个问题?
最佳答案
您缺少一些在 <5.0 设备上运行所需的额外功能。
compile 'com.android.support:multidex:1.0.0'
attachBaseContext()
以在之后调用 MutiDex.install(this)
super.attachBaseContext(base);
您可以在此处查看完整的文档(可能会在您发布后更新)https://developer.android.com/tools/building/multidex.html#mdex-gradle .请参阅“使用 Gradle 为 Multidex 配置您的应用程序”部分。
关于Android Multidex 和支持库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27340058/
我的 processmaker 安装遇到了一些问题。我正在尝试使用本指南 [url]http://wiki.processmaker.com/index.php/ProcessMaker_Ubuntu
我正在使用 ShareKit。发送 SMS 消息使用 MFMessageComposeViewController,用户看到标题“文本”。我想将该标题更改为更能反射(reflect)实际可用内容的内容
我需要在我的一个针对 Gingerbread 的 Android 应用程序中使用操作栏和 fragment 的组合。所以我使用了 v7 支持库中的操作栏和 v4 支持库中的 fragment ,并使用
我明白为什么浏览器 vendor 不想帮助我阻止他们的 UI 线程。但是,我不明白为什么会有: Web Workers 中没有 sleep (2) 没有同步 WebSockets API 有一个syn
最近我的组织正在考虑使用 Docker。我们组使用的是cloudera CDH 5.1.2。 1) cloudera 是否与 Docker 容器兼容?2) docker 和cloudera 组合是否存
我正在尝试通过编译在 Mac 上安装 rsync 3.2.3。但是,我想安装所有功能。为此,它需要一些库,此处 ( https://download.samba.org/pub/rsync/INSTA
我一直在使用 PyDev 成功运行 nose 测试,并想试试 nose2。 所以我安装了它 pip install nose2 复制/粘贴来自 http://nose2.info/ 的示例代码进入名为
我想知道 LLVM 中是否有任何函数/方法可以在 LLVM IR 中添加 Open-MP 构造。 llvm-3.0 是否仍然支持 OpenMP 指令? 最佳答案 OpenMP 是一种高级语言扩展。因此
我对 CUDA 编程非常陌生。我正在浏览 SDK 附带的示例。我能够编译代码,但是当我运行它时,出现以下错误: "clock.cu(177) : CUDA Runtime API error 38:
RStudio 是用于 R 开发的出色 IDE。我想知道是否有任何方法可以很好地支持 HiDPI 分辨率? 我目前有 13 英寸显示器和 3200x1800 分辨率,甚至很难阅读 RStudio 选项
我正在寻找一种有助于为 Django 项目提供 RDF 支持的工具。 到目前为止,我发现了两个: django-rdf - 最后一次修改是在 4 年前,所以它看起来像是一个死项目。 djubby -
我刚刚尝试了一些 JS 核心原则,发现引擎评估链接的关系运算符而不会引发错误。相反,他们以我自己无法理解的方式进行评估。 console.log(1 4 > 3 > 2 > 1); //false,
我知道 etexteditor 和 vim/emacs。 是否有任何其他 Windows 编辑器支持类似 textmate 的片段(例如,您编写触发词,按 Tab,它更改为某些内容,再次按 Tab,它
我正在尝试找出验证给定集群的网络策略配置的最佳方法。 According to the documentation Network policies are implemented by the ne
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
Z3 会支持 AUFBV 吗? 对于以下脚本: (set-logic AUFBV) (declare-fun x () (_ BitVec 16)) (declare-const t (Array (
使用分部类编写 NUnit 测试的优缺点是什么? 我要开始了: 亲:可以测试私有(private)方法 缺点:TDD 不再可能了 还有什么? 最佳答案 缺点:要么您必须测试与您发布的版本不同的构建,要
它很容易(对于 90% 的 aop 特性)在没有任何语言本身支持的情况下做到这一点,就像大多数动态语言如 python 和 ruby 一样。然而,Dojo在 1.3.2 上直接支持它.最新版本发生
我在我的 android 应用程序中使用亚洲字符,我已经了解到某些字符无法显示,因为系统字体不支持它们。我查询了一个包含亚洲字符的数据库,并且经常检索到无法显示的标志。这些情况对我的应用程序来说通常不
你好,我想实现一个控件,我想在用户键入@字符时启用该控件,直到未填充运行文本中的空格为止,它应该显示用户列表,@符号后键入的文本应该显示基于键盘字符的建议,就像我们在上面看到的那样Twitter 或
我是一名优秀的程序员,十分优秀!