Skip to content Skip to sidebar Skip to footer

No JNI_Onload() Found And VM Shutting Down

I am new to Android , I followed the instructions on the link http://marakana.com/forums/android/examples/49.html to create the basic application using NDK. I followed those steps

Solution 1:

As mentioned, JNI_OnLoad isn't necessary. Here's your problem:

Unable to instantiate activity ComponentInfo {com.example.NDKDemo/com.example.NDKDemo.NativeLib}: java.lang.ClassCastException: com.example.NDKDemo.NativeLib cannot be cast to android.app.Activity

Your bug isn't even an NDK issue, it looks like: Your class com.example.NDKDemo.NativeLib can't be cast to android.app.Activity.

The class you list in AndroidManifest.xml is the one that derives from Activity. If you created an NDKDemo class like in the example, then that's your activity, and you should name it in AndroidManifest.xml:

<activity android:name="NDKDemo" ... other options ... >

Post a Comment for "No JNI_Onload() Found And VM Shutting Down"