java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22526925/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
提问by John Error
I develop an android application. I use AppCombat Theme and when I run my program, I have a java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
. Its logs are:
我开发了一个安卓应用程序。我使用 AppCombat 主题,当我运行我的程序时,我有一个java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
. 它的日志是:
Process: com.nomad, PID: 12866
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.telera.ui.activities.OABaseActivity.onCreate(OABaseActivity.java:47)
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.access0(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(Zygote`
How can I fix that problem?
我该如何解决这个问题?
回答by Raghunandan
java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleableY
java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleableY
You need to reference AppCompat
in your Android project. You have not referenced the library project properly.
您需要AppCompat
在您的 Android 项目中引用。您没有正确引用库项目。
Check Adding Support Librarywith resources
检查使用资源添加支持库