我已经提及Error implementing Support Library Action Bar。但是,我的问题仍然存在。
我从上面的链接中注意到的一条评论
Are you completely sure that you have "android.support.v7.appcompat.R.java" in your gen folder? Without it, it won't work – Bored
我的R.java位于org.hello.restWebService(我的项目包名称),不在android.support.v7.appcompat下。因为这个吗?所以我得到了错误。
我经历过java桌面开发人员,但非常关于Android应用程序开发的新内容。所以不太清楚R.java的想法以及它应该生成什么内容代码看起来像。
希望有人建议,谢谢
03-30 23:14:49.128: E/AndroidRuntime(1205): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:107)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
03-30 23:14:49.128: E/AndroidRuntime(1205): at org.hello.rest.MainActivity.onCreate(MainActivity.java:22)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.app.Activity.performCreate(Activity.java:5231)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.app.ActivityThread.access$800(ActivityThread.java:135)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.os.Handler.dispatchMessage(Handler.java:102)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.os.Looper.loop(Looper.java:136)
03-30 23:14:49.128: E/AndroidRuntime(1205): at android.app.ActivityThread.main(ActivityThread.java:5017)
03-30 23:14:49.128: E/AndroidRuntime(1205): at java.lang.reflect.Method.invokeNative(Native Method)
03-30 23:14:49.128: E/AndroidRuntime(1205): at java.lang.reflect.Method.invoke(Method.java:515)
03-30 23:14:49.128: E/AndroidRuntime(1205): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
03-30 23:14:49.128: E/AndroidRuntime(1205): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
03-30 23:14:49.128: E/AndroidRuntime(1205): at dalvik.system.NativeStart.main(Native Method)