首先,使用Eclipse。它在安装插件后创建了4个项目(作为库),并在我的android项目中创建了4个项目的kit-libs。然后我构建了项目并成功编译了apk但运行失败。日志失败:
12-22 17:50:07.377: E/dalvikvm(8452): Could not find class 'io.fabric.sdk.android.Kit[]', referenced from method com.pplive.test.fabric.MainActivity.onCreate
12-22 17:50:07.377: W/dalvikvm(8452): VFY: unable to resolve new-array 650 ([Lio/fabric/sdk/android/Kit;) in Lcom/pplive/test/fabric/MainActivity;
12-22 17:50:07.377: D/dalvikvm(8452): VFY: replacing opcode 0x23 at 0x0004
12-22 17:50:07.377: D/dalvikvm(8452): DexOpt: unable to opt direct call 0x0ff0 at 0x09 in Lcom/pplive/test/fabric/MainActivity;.onCreate
12-22 17:50:07.383: D/AndroidRuntime(8452): Shutting down VM
12-22 17:50:07.383: W/dalvikvm(8452): threadid=1: thread exiting with uncaught exception (group=0x41be8930)
12-22 17:50:07.386: E/AndroidRuntime(8452): FATAL EXCEPTION: main
12-22 17:50:07.386: E/AndroidRuntime(8452): java.lang.NoClassDefFoundError: io.fabric.sdk.android.Kit[]
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.pplive.test.fabric.MainActivity.onCreate(MainActivity.java:15)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.Activity.performCreate(Activity.java:5206)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.lbe.security.service.core.client.internal.InstrumentationDelegate.callActivityOnCreate(InstrumentationDelegate.java:76)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2171)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.access$600(ActivityThread.java:142)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1235)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.os.Looper.loop(Looper.java:137)
12-22 17:50:07.386: E/AndroidRuntime(8452): at android.app.ActivityThread.main(ActivityThread.java:5072)
12-22 17:50:07.386: E/AndroidRuntime(8452): at java.lang.reflect.Method.invokeNative(Native Method)
12-22 17:50:07.386: E/AndroidRuntime(8452): at java.lang.reflect.Method.invoke(Method.java:511)
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:812)
12-22 17:50:07.386: E/AndroidRuntime(8452): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:579)
12-22 17:50:07.386: E/AndroidRuntime(8452): at dalvik.system.NativeStart.main(Native Method)
我是否需要修改属性中的构建路径?
答案 0 :(得分:4)
我几天前发现了同样的问题,昨天我通过以下方式解决了这个问题:
希望它也适合你。