我知道有很多这样的问题,“解决方案”是确保检查 Android Private Libraries。就我而言,它们是,还有其他提示吗?应用程序一开始就崩溃。
这是堆栈跟踪
08-02 00:22:58.316: E/Trace(4825): 打开跟踪文件时出错:没有这样的文件或目录 (2)
08-02 00:22:59.035: W/dalvikvm(4825): VFY: 无法找到签名中引用的类 (Landroid/support/v4/app/Fragment;)
08-02 00:22:59.035: W/dalvikvm(4825): VFY: 无法找到签名中引用的类 (Landroid/support/v4/app/Fragment;)
08-02 00:22:59.045: I/dalvikvm(4825): 找不到方法 android.support.v4.content.LocalBroadcastManager.getInstance,引用自方法 com.facebook.Session.postActiveSessionAction
08-02 00:22:59.045: W/dalvikvm(4825): VFY: 无法解析静态方法 187: Landroid/support/v4/content/LocalBroadcastManager;.getInstance (Landroid/content/Context;)Landroid/support/v4 /content/LocalBroadcastManager;
08-02 00:22:59.045: D/dalvikvm(4825): VFY: 在 0x0009 处替换操作码 0x71
08-02 00:22:59.075: D/AndroidRuntime(4825): 关闭 VM
08-02 00:22:59.075: W/dalvikvm(4825): threadid=1: 线程以未捕获的异常退出 (group=0x40a71930)
08-02 00:22:59.095:E/AndroidRuntime(4825):致命异常:主要
08-02 00:22:59.095: E/AndroidRuntime(4825): java.lang.NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 com.facebook.Session.postActiveSessionAction(Session.java:1215)
08-02 00:22:59.095: E/AndroidRuntime(4825): at com.facebook.Session.setActiveSession(Session.java:765)
08-02 00:22:59.095: E/AndroidRuntime(4825): at com.facebook.Session.openActiveSession(Session.java:865)
08-02 00:22:59.095: E/AndroidRuntime(4825): at com.facebook.Session.openActiveSession(Session.java:805)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 com.example.firstandroidapp.MainActivity.onCreate(MainActivity.java:22)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.app.Activity.performCreate(Activity.java:5104)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.app.ActivityThread.access$600(ActivityThread.java:141)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.os.Handler.dispatchMessage(Handler.java:99)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.os.Looper.loop(Looper.java:137)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 android.app.ActivityThread.main(ActivityThread.java:5041)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 java.lang.reflect.Method.invokeNative(Native Method)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 java.lang.reflect.Method.invoke(Method.java:511)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
08-02 00:22:59.095: E/AndroidRuntime(4825): 在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
08-02 00:22:59.095: E/AndroidRuntime(4825): at dalvik.system.NativeStart.main(Native Method)