java - 在android中,使用android支持appcompat库运行弹出程序时

  显示原文与译文双语对照的内容
79 5

我正在尝试在我的android应用程序中实现一个弹出菜单,它将被 android 2.2支持。所以我使用android-support-v7-appcompat支持库来做它。但不幸的是我收到 java.lang.NoClassDefFoundError 异常。无法排序,所以有人能帮我出去?提前致谢!

,显示

06-27 15:40:30.160: E/AndroidRuntime(26985): FATAL EXCEPTION: main
06-27 15:40:30.160: E/AndroidRuntime(26985): java.lang.NoClassDefFoundError: android.support.v7.internal.view.menu.MenuBuilder
06-27 15:40:30.160: E/AndroidRuntime(26985): at android.support.v7.widget.PopupMenu.<init>(PopupMenu.java:66)
06-27 15:40:30.160: E/AndroidRuntime(26985): at com.example.basic.MainActivity$4.onClick(MainActivity.java:401)
06-27 15:40:30.160: E/AndroidRuntime(26985): at android.view.View.performClick(View.java:4421)
06-27 15:40:30.160: E/AndroidRuntime(26985): at android.view.View$PerformClick.run(View.java:17903)
06-27 15:40:30.160: E/AndroidRuntime(26985): at android.os.Handler.handleCallback(Handler.java:730)
06-27 15:40:30.160: E/AndroidRuntime(26985): at android.os.Handler.dispatchMessage(Handler.java:92)
06-27 15:40:30.160: E/AndroidRuntime(26985): at android.os.Looper.loop(Looper.java:213)
06-27 15:40:30.160: E/AndroidRuntime(26985): at android.app.ActivityThread.main(ActivityThread.java:5225)
06-27 15:40:30.160: E/AndroidRuntime(26985): at java.lang.reflect.Method.invokeNative(Native Method)
06-27 15:40:30.160: E/AndroidRuntime(26985): at java.lang.reflect.Method.invoke(Method.java:525)
06-27 15:40:30.160: E/AndroidRuntime(26985): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:741)
06-27 15:40:30.160: E/AndroidRuntime(26985): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
06-27 15:40:30.160: E/AndroidRuntime(26985): at dalvik.system.NativeStart.main(Native Method)
时间:原作者:0个回答

142 0

签出项目-> 属性-> Java Build 路径/顺序和导出。使用 android.support.v7.internal.view.menu.MenuBuilder 检查库和依赖项

原作者:
...