native-activity

“Unable to find native library” error in Native Activity app

余生长醉 提交于 2019-12-05 19:16:18
问题 I have some problems with my Native Activity application. It works fine on 99% of devices. But sometimes users get the following error: java.lang.RuntimeException: Unable to start activity ComponentInfo{nightradio.sunvox/nightradio.sunvox.MyNativeActivity}: java.lang.IllegalArgumentException: Unable to find native library: sundog at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2095) at android

Problem using OpenCV2.3.1 with Android Native Activity

。_饼干妹妹 提交于 2019-12-04 23:42:07
i'm developing a computer vision application for Android. That work involves getting camera frames as fast as possible, so I'm trying to build a android application directly in c++ using "android_native_app_glue" and "libnative_camera" to get camera frames. It seems to be incompatible. I tested out 2 options. I tried to use OpenCV on the android NDK sample "NativeActivity", just make the few necessary changes (convert sample to c++, modify android.mk y application.mk and including using namespaces and includes) It gives the following error: sharedLibrary : libnative-activity.so C:/Development

Access Android APK Asset data directly in c++ without Asset Manager and copying

ぃ、小莉子 提交于 2019-12-04 17:43:20
问题 I'm using pure C++ in my engine to create a game engine in android. There is no single java file. Basically it is a game which should only be stored to external memory. When I move my asset data manually via adb to my external sd card the game works already fine and stable. adb push ..\..\Bin\Data /sdcard/Android/data/com.fantasyhaze.%SMALL_PACKAGE_NAME%/files/Data/ This is not a good solution because it can not be delivered. Therefore I have my assets-data in Assets folder which gets moved

“Unable to find native library” error in Native Activity app

橙三吉。 提交于 2019-12-04 02:11:44
I have some problems with my Native Activity application. It works fine on 99% of devices. But sometimes users get the following error: java.lang.RuntimeException: Unable to start activity ComponentInfo{nightradio.sunvox/nightradio.sunvox.MyNativeActivity}: java.lang.IllegalArgumentException: Unable to find native library: sundog at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2095) at android.app.ActivityThread.access$600(ActivityThread.java:134) at android.app.ActivityThread$H.handleMessage

fopen/fread APK Assets from NativeActivity on Android

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 07:52:42
问题 I have only been able to find solutions dated 2010 and earlier. So I wanted to see if there was a more up-to-date stance on this. I'd like to avoid using Java and purely use C++, to access files (some less-or-more than 1MB) stored away in the APK. Using AssetManager means I can't access files like every other file on every other operating system (including iOS). If not, is there a method in C++ where I could somehow map fopen/fread to the AssetManager APIs? 回答1: I actually found pretty

Hardware scaling the OpenGL surface with NativeActivity

限于喜欢 提交于 2019-12-02 16:45:07
问题 We're trying to run a complex OpenGL app on a device whose native screen size is 1080p. Unfortunately, the device's 3D chipset isn't really good enough for a decent frame rate at this size. What we'd much prefer to do is the render at 720p (or less) and then do hardware accelerated upscaling to fill the screen. I know Android can do this automatically with 2D content (using ANativeWindow_lock() and friends). Is there any way to do this automatically for 3D content as well? 回答1: For a

Hardware scaling the OpenGL surface with NativeActivity

血红的双手。 提交于 2019-12-02 08:02:34
We're trying to run a complex OpenGL app on a device whose native screen size is 1080p. Unfortunately, the device's 3D chipset isn't really good enough for a decent frame rate at this size. What we'd much prefer to do is the render at 720p (or less) and then do hardware accelerated upscaling to fill the screen. I know Android can do this automatically with 2D content (using ANativeWindow_lock() and friends). Is there any way to do this automatically for 3D content as well? For a GLSurfaceView, use: surfaceView = new GLSurfaceView(this); surfaceView.getHolder().setFixedSize(1280, 720); For a

Race condition in android dlopen()?

浪尽此生 提交于 2019-12-01 18:25:41
My Android app has a simple "loader" NativeActivity with a very simple android_main() which only loads a different shared object and passes control to it: typedef void (*Tandroid_main)( android_app*); void android_main( android_app* state ) { void* glib = dlopen("libmain.so", RTLD_NOW); void* fmain = dlsym(glib, "android_main"); Tandroid_main libmain = (Tandroid_main)fmain; libmain(state) } This works well.. about half of the times. Other times it crashes since dlopen() fails and return NULL with errno=2 (No such file). Due to the strange inconsistency of this occurrence I suspected a timing

Race condition in android dlopen()?

帅比萌擦擦* 提交于 2019-12-01 17:39:46
问题 My Android app has a simple "loader" NativeActivity with a very simple android_main() which only loads a different shared object and passes control to it: typedef void (*Tandroid_main)( android_app*); void android_main( android_app* state ) { void* glib = dlopen("libmain.so", RTLD_NOW); void* fmain = dlsym(glib, "android_main"); Tandroid_main libmain = (Tandroid_main)fmain; libmain(state) } This works well.. about half of the times. Other times it crashes since dlopen() fails and return NULL

How-to use a shared library in native-activity

给你一囗甜甜゛ 提交于 2019-12-01 15:47:01
问题 I have an Android project with a native activity. This native activity uses a shared library named "main" (libmain.so file) for starting. ( with the code of ndk/samples/native-activity ) This app works fine. the "main" module Android.mk file : LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := main LOCAL_SRC_FILES := main.cpp LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM LOCAL_STATIC_LIBRARIES := android_native_app_glue game include $(BUILD_SHARED_LIBRARY) $(call import