这些是来自LogCat的一堆文本..我无法找出异常的位置
07-06 04:03:55.933:D / dalvikvm(16700):open_cached_dex_file: /mnt/asec/com.database-1/pkg.apk /data/dalvik-cache/mnt@asec@com.database-1@pkg.apk@classes.dex 07-06 04:03:55.943:D / dalvikvm(16700):注意:loadClass ' android.support.v7.appcompat.R $设置样式' 0x4127ce20抛出异常 Ljava /郎/ ClassNotFoundException的; 07-06 04:03:55.943: W / dalvikvm(16700):VFY:无法解析静态字段1559 (ActionBarWindow)在Landroid / support / v7 / appcompat / R $ styleable中; 07-06 04:03:55.944:D / dalvikvm(16700):VFY:在0x0004处替换操作码0x62 07-06 04:03:55.947:D / AndroidRuntime(16700):关闭VM 07-06 04:03:55.947:W / dalvikvm(16700):threadid = 1:线程退出 未捕获的异常(组= 0x40fa09a8)07-06 04:03:55.948: E / test(16700):例外07-06 04:03:55.949:E / AndroidRuntime(16700): 致命异议:主07-06 04:03:55.949:E / AndroidRuntime(16700): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R $ styleable 07-06 04:03:55.949: E / AndroidRuntime(16700):at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:107) 07-06 04:03:55.949:E / AndroidRuntime(16700):at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58) 07-06 04:03:55.949:E / AndroidRuntime(16700):at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 07-06 04:03:55.949:E / AndroidRuntime(16700):at com.database.MainActivity.onCreate(MainActivity.java:22)07-06 04:03:55.949:E / AndroidRuntime(16700):at android.app.Activity.performCreate(Activity.java:5182)07-06 04:03:55.949:E / AndroidRuntime(16700):at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081) 07-06 04:03:55.949:E / AndroidRuntime(16700):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270) 07-06 04:03:55.949:E / AndroidRuntime(16700):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358) 07-06 04:03:55.949:E / AndroidRuntime(16700):at android.app.ActivityThread.access $ 600(ActivityThread.java:156)07-06 04:03:55.949:E / AndroidRuntime(16700):at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1340) 07-06 04:03:55.949:E / AndroidRuntime(16700):at android.os.Handler.dispatchMessage(Handler.java:99)07-06 04:03:55.949:E / AndroidRuntime(16700):at android.os.Looper.loop(Looper.java:153)07-06 04:03:55.949: E / AndroidRuntime(16700):at android.app.ActivityThread.main(ActivityThread.java:5299)07-06 04:03:55.949:E / AndroidRuntime(16700):at java.lang.reflect.Method.invokeNative(Native Method)07-06 04:03:55.949:E / AndroidRuntime(16700):at java.lang.reflect.Method.invoke(Method.java:511)07-06 04:03:55.949: E / AndroidRuntime(16700):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:833) 07-06 04:03:55.949:E / AndroidRuntime(16700):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)07-06 04:03:55.949:E / AndroidRuntime(16700):at dalvik.system.NativeStart.main(原生方法)
请帮我解决这个问题......
答案 0 :(得分:0)
似乎没有正确配置v7 compat库,如日志中所示
“java.lang.NoClassDefFoundError:android.support.v7.appcompat.R $ styleable”
如果您使用的是Eclipse,请转到包浏览器,右键单击项目和Android工具>添加支持库。之后,清理并构建您的项目。
希望这可以解决您的错误!