خرید بک لینک

Vote count: 0

Creating a native activity in android:

  • via vim & Makefile only
  • no use of gradle, ant, maven, android.mk and all that other stuff
  • I already created a (java-native) android apk via makefile that works well on my Samsung S7.
  • When I try to run the app, it crashes.
  • My gut feeling says I haven't compiled/linked the android_native_app_glue.c --> libandroid_native_app_glue.a with main.cpp --> libnative-activity.so properly.
  • It works fine with Google's pre-compiled armeabi-v7a libnative-activity.so

I create the static app-glue first as:

aarch64-linux-android-gcc -march=armv8-a -c android_native_app_glue.c -o native_app_glue.o
aarch64-linux-android-ar rcs libandroid_native_app_glue.a native_app_glue.o

Then I compile and link main.cpp with:

aarch64-linux-android-c++ -march=armv8-a -std=c++11 -fPIC -c main.cpp -o main.o
aarch64-linux-android-c++ -shared -llog -landroid -lEGL -lGLESv1_CM -lnative_app_glue main.o -o libnative-activity.a

08-28 14:41:19.019 30897 30897 E AndroidRuntime: Process: com.example.native_activity, PID: 30897
08-28 14:41:19.019 30897 30897 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.native_activity/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to load native library: /data/app/com.example.native_activity-1/lib/arm64/libnative-activity.so

asked 44 secs ago

برچسب: create native android app from website,create native android app,create android native service,create android native extension,create android native library,create native ios android,create a native android app of your blog,create native window android,how to create native android app in eclipse,android create native activity, نویسنده: استخدام کار تاريخ: يکشنبه 7 شهريور 1395 ساعت: 13:21

صفحه بندی