Home > other >  Compile ICS/JB camera application - jni native libraries - Mosaic errors
Compile ICS/JB camera application - jni native libraries - Mosaic errors

Time:09-25


I want to use ICS/JB camera applications have a panoramic view of model, I have download the source code (resources), and try to solve all of the code compiler error, but as long as I began my application of equipment (JB) operation, I get this error:
10 to 25 14:42:53. 617: E/AndroidRuntime (23147) : FATAL EXCEPTION: GLThread 2586
10 to 25 14:42:53. 617: E/AndroidRuntime (23147) : Java. Lang. UnsatisfiedLinkError: Native method not found: com. App. Camera. The panorama. MosaicRenderer. Reset (IIZ) V
10 to 25 14:42:53. 617: E/AndroidRuntime (23147) : at the app. Camera. Panorama. MosaicRenderer. Reset (Native Method)
10 to 25 14:42:53. 617: E/AndroidRuntime (23147) : at the app. Camera. Panorama. MosaicRendererSurfaceViewRenderer. OnSurfaceChanged (49) MosaicRendererSurfaceViewRenderer. Java:
10 to 25 14:42:53. 617: E/AndroidRuntime (23147) : an android.. Opengl GLSurfaceView $GLThread. GuardedRun (GLSurfaceView. Java: 1505)
10 to 25 14:42:53. 617: E/AndroidRuntime (23147) : an android.. Opengl GLSurfaceView $GLThread. Run (1240) GLSurfaceView. Java:

I do have a libjni - Mosaic lib, located in armeabi - v7a/armeabi/x86, it seem to be able to load it well, but it may not contain the method to realize MosaicRenderer,
I also tried to compile CyanogenMod camera application https://github.com/CyanogenMod/android_packages_apps_Camera/tree/ics but I got the same error...
The working principle of the camera itself for stills and video recording, but as long as I switch to the panorama mode, it crashes,
Anyone can point to me the right jni - Mosaic lib or what did I do wrong? What I need to do to make my application using JNI/SO file?








CodePudding user response:


You move the Java class MosaicRenderer packaging com. App. Camera. Panorama, but mosaic_renderer_jni. CPP file still have local method refers to the com. Android. Camera. Panorama, like
JNIEXPORT void Java_com_android_camera_panorama_MosaicRenderer_reset (

You should change the function name in native code, to reflect the new package names, such as
JNIEXPORT void Java_com_app_camera_panorama_MosaicRenderer_reset (

CodePudding user response:


If someone intends to make Google still native camera application, I suggest you the warehouse https://android.googlesource.com/platform/packages/apps/Camera2/It does not need to set up all the Android OS code. It helped me a lot,

CodePudding user response:

Mechanism of confusion caused by it,
Proguard. Add a line of flags:
- keep the class com. Yunos. Camera. * {*; }
  • Related