android - java.lang.NoClassDefFoundError : android. support.v7.appcompat.R$styleable

标签 android exception missing-data

我正在使用终端 [不是 Eclipse]。我得到以下异常错误,而我成功使用 emulator.debug 并成功安装。但是模拟器显示不幸的是应用程序已经停止。然后我运行 $ adb logcat 它将显示以下内容。

java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:107)
at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
at com.example.trintwo.MainActivity.onCreate(MainActivity.java:19)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)

我得到了这个错误,即使我安装了 android 支持库,我也检查了 android/support/v7/appcompat/lib 中的 android-support-v7-appcompat.jar path 我将如何清除此错误。

最佳答案

确保执行以下操作(来自 Support Library Setup):

  1. Right-click the library project folder and select Build Path > Configure Build Path.

  2. In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.

  3. Uncheck Android Dependencies.

关于android - java.lang.NoClassDefFoundError : android. support.v7.appcompat.R$styleable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20900832/

相关文章:

java - 检测何时在 Root设备上接听去电

Android 单击时更改图像,自定义可扩展列表适配器

android - View 引用成员变量和局部变量的区别

Java 线程在没有异常/可抛出的情况下停止

python - 根据严格的不平等和缺失数据过滤 Pandas 数据框

android - Android服务错误处理

C++ 自定义异常消息不显示

Laravel 8 : render exception as html for email

error-handling - 如何修复错误 : Subscript `AMr1.orig` is a matrix, 数据 `x.imp[, -possibleFactors][AMr1.orig]` 的大小必须为 1

r - 距离矩阵中缺失数据的插补