Android NativeActivity samples crashes

Log

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.
native_activity/android.app.NativeActivity}: java.lang.IllegalArgumentException
: Unable to find native library: native-activity

Answer

cd native-activity
 
ant clean
ndk-build clean
 
mkdir src
sed -i 's/hasCode="false"/hasCode="true"/g' AndroidManifest.xml
 
ndk-build
ant debug

Over!

Leave a Reply

Your email address will not be published. Required fields are marked *