java.lang.NoClassDefFoundError: android.bluetooth.BluetoothManager

I follow the instructions in https://wiki.libsdl.org/Android using androidbuild.sh with test/testgles.c and it was built and installed successfully to Android phone 4.1.2 (Jelly Bean API 16) but it crashed with message:

E/AndroidRuntime: FATAL EXCEPTION: SDLActivity
java.lang.NoClassDefFoundError: android.bluetooth.BluetoothManager

I’ve found similar issue here https://stackoverflow.com/q/34314408 seems like Bluetooth supports in only available for API >= 18? How to run SDL on phone with API < 18 as I don’t really need gamepad supports though?

Thanks in advance! :slight_smile:

1 Like

Hi Pixel,

Did you ever resolve this issue? It just happened to me recently and it seems to be caused by the introduction of the following line in AndroidManifest.xml :

<uses-permission android:name="android.permission.BLUETOOTH" />

I remove it and it works, this line was added recently and because it breaks early API levels, it’s probably a bug.