0
我只是試圖從(http://developer.android.com/samples/BluetoothLeGatt/project.html)在我的Nexus 7 2013安裝BluetoothLeGatt樣品用的是Android 4.4.2,它始終無法啓動,說:「不幸的是,BluetoothLeGatt已停止」藍牙低耗能的Android exsample不起作用
以下是錯誤日誌:
02-20 17:13:09.728: D/dalvikvm(30728): Late-enabling CheckJNI
02-20 17:13:09.738: D/dalvikvm(30728): Debugger has detached; object registry had 1 entries
02-20 17:13:09.768: D/AndroidRuntime(30728): Shutting down VM
02-20 17:13:09.768: W/dalvikvm(30728): threadid=1: thread exiting with uncaught exception (group=0x41559ba8)
02-20 17:13:09.768: W/ActivityThread(30728): Application com.example.android.bluetoothlegatt can be debugged on port 8100...
02-20 17:13:09.768: E/AndroidRuntime(30728): FATAL EXCEPTION: main
02-20 17:13:09.768: E/AndroidRuntime(30728): Process: com.example.android.bluetoothlegatt, PID: 30728
02-20 17:13:09.768: E/AndroidRuntime(30728): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.bluetoothlegatt/com.example.android.bluetoothlegatt.DeviceScanActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.android.bluetoothlegatt.DeviceScanActivity" on path: DexPathList[[zip file "/data/app/com.example.android.bluetoothlegatt-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.bluetoothlegatt-2, /vendor/lib, /system/lib]]
02-20 17:13:09.768: E/AndroidRuntime(30728): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
02-20 17:13:09.768: E/AndroidRuntime(30728): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
02-20 17:13:09.768: E/AndroidRuntime(30728): at android.app.ActivityThread.access$800(ActivityThread.java:135)
02-20 17:13:09.768: E/AndroidRuntime(30728): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
02-20 17:13:09.768: E/AndroidRuntime(30728): at android.os.Handler.dispatchMessage(Handler.java:102)
02-20 17:13:09.768: E/AndroidRuntime(30728): at android.os.Looper.loop(Looper.java:136)
02-20 17:13:09.768: E/AndroidRuntime(30728): at android.app.ActivityThread.main(ActivityThread.java:5017)
02-20 17:13:09.768: E/AndroidRuntime(30728): at java.lang.reflect.Method.invokeNative(Native Method)
你可以上傳錯誤日誌嗎? – Kedarnath
嗨,請在括號[https://docs.google.com/document/d/1DBQ3t58zJoYgMw_U7MmuDk8CjfXa9VxgPjQQCpo1Mew/edit?usp=sharing]謝謝以下網址找到錯誤日誌。 – user3332037
如果您確實複製了所有內容,您還沒有正確設置項目。它無法優化DeviceScanActivity。它在清單中嗎? – Ifor