set android:hasCode="true" in AndroidManifest.xml
On Nov 11, 9:11 am, mikelong <mikelong1...@gmail.com> wrote:
> See this thread...
>
> http://groups.google.com/group/android-ndk/browse_thread/thread/1590a...
>
> On Nov 6, 7:41 pm, Eric <erics...@gmail.com> wrote:
>
>
>
>
>
>
>
> > So, I have opened several samples and they all work except for
> >NativeActivity.
> > I uninstalled and reinstalled everything
>
> > I do ndk-build ofNativeActivitysample jni directory
>
> > ericstob@ericvaio /cygdrive/c/Android/android-ndk-r6b/samples/native-
> > activity/jni
> > $ ndk-build
> > Compile thumb : native-activity <= main.c
> > Compile thumb : android_native_app_glue <= android_native_app_glue.c
> > StaticLibrary : libandroid_native_app_glue.a
> > SharedLibrary : libnative-activity.so
> > Install : libnative-activity.so => libs/armeabi/libnative-
> > activity.so
>
> > ericstob@ericvaio /cygdrive/c/Android/android-ndk-r6b/samples/native-
> > activity/jni
> > $
>
> > I go to eclipse and click New -> Project -> From Existing Source, C:
> > \Android\android-ndk-r6b\samples\native-activity
>
> > I click run as android app and select my device, and I get this:
>
> > 11-06 17:06:57.328: E/AndroidRuntime(18418):
> > 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
>
> > but when I open my .apk I see libnative-activity.so there:
> > ericstob@ericvaio /cygdrive/c/Android/android-ndk-r6b/samples/native-
> > activity/bin
> > $ unzipNativeActivity.apk -d temp