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 exactly. I also created the shared library. When I run the application, CatLog shows the following errors:
Trying to load lib /data/data/com.example.NDKDemo/lib/libndk_demo.so 0x4129dc18
01-30 04:50:58.856: D/dalvikvm(586): Added shared lib
/data/data/com.example.NDKDemo/lib/libndk_demo.so 0x4129dc18
01-30 04:50:58.856: D/dalvikvm(586): No JNI_OnLoad found in
/data/data/com.example.NDKDemo/lib/libndk_demo.so 0x4129dc18,
skipping init
01-30 04:50:58.866: D/AndroidRuntime(586): Shutting down VM
01-30 04:50:58.866: W/dalvikvm(586): threadid=1: thread exiting with uncaught
exception (group=0x409c01f8)
01-30 04:50:58.896: E/AndroidRuntime(586): FATAL EXCEPTION: main
01-30 04:50:58.896: E/AndroidRuntime(586): java.lang.RuntimeException:
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