0

I just tried installing BluetoothLeGatt sample from (http://developer.android.com/samples/BluetoothLeGatt/project.html) on my Nexus 7 2013 with Android 4.4.2 and it always fails to start saying "Unfortunately, BluetoothLeGatt has stopped"

Following is error logs:

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)
Lucifer
  • 29,392
  • 25
  • 90
  • 143
  • Can you upload the error logs ? – Lucifer Feb 20 '14 at 09:53
  • Hi, please find the error log on following url within brackets [https://docs.google.com/document/d/1DBQ3t58zJoYgMw_U7MmuDk8CjfXa9VxgPjQQCpo1Mew/edit?usp=sharing] thanks. – user3332037 Feb 20 '14 at 11:45
  • You have not got the project setup properly if you really have copied everything. It's failing to fine the DeviceScanActivity. Is it in the manifest? – Ifor Feb 20 '14 at 15:30
  • Yes its in the manifest, I can side load the app to the device without any problem, the problem is it gives me "Unfortunately, BluetoothLeGatt has stopped" every time when I run it on the device – user3332037 Feb 24 '14 at 04:00
  • and I think there is some thing to do with dalvik and ART, please have a look at following error log. https://docs.google.com/document/d/1123A83DAS8A5odfsat36S7hQvWURJHvTtV7OJyPWIOg/edit?usp=sharing Thanks – user3332037 Feb 24 '14 at 04:04

1 Answers1

1

Not sure if you figured this out already, but I had the same issue. The samples are based on Android Studio not Eclipse+ADT. If you install the latest version of Android Studio and then import the sample project it will run on the device, and I was able to detect peripheral devices.