where do we place android prebuilt/required libraries while building android native extensions in RhoMobile App development?

r ramprasad vangara 3 years 6 months ago
5 3 0

Hi,

I am trying to create an android native extension in RhoMobile App development and I have placed all my libs, assets, resources under additional_files folder and configured as mentioned in documentation in ext.yml.

getting successful Build and loading into device...but when I am accessing application getting force close giving the following error message in the log trace...

Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: get_lib_extents[743]:  1913 data/data/com.rhomobile.neproject/lib/libSomething.so is not a valid ELF object

                                                                                                             (or)

W/dalvikvm(23066): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/rhomobile/rhodes/RhodesApplication;
W/dalvikvm(23066): Class init failed in newInstance call (Lcom/rhomobile/rhodes/RhodesApplication;)
D/AndroidRuntime(23066): Shutting down VM
W/dalvikvm(23066): threadid=1: thread exiting with uncaught exception (group=0x40018578)
E/AndroidRuntime(23066): FATAL EXCEPTION: main
E/AndroidRuntime(23066): java.lang.ExceptionInInitializerError
E/AndroidRuntime(23066):  at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(23066):  at java.lang.Class.newInstance(Class.java:1409)
E/AndroidRuntime(23066):  at android.app.Instrumentation.newApplication(Instrumentation.java:957)
E/AndroidRuntime(23066):  at android.app.Instrumentation.newApplication(Instrumentation.java:942)
E/AndroidRuntime(23066):  at android.app.LoadedApk.makeApplication(LoadedApk.java:461)
E/AndroidRuntime(23066):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3264)
E/AndroidRuntime(23066):  at android.app.ActivityThread.access$2200(ActivityThread.java:117)
E/AndroidRuntime(23066):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
E/AndroidRuntime(23066):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(23066):  at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(23066):  at android.app.ActivityThread.main(ActivityThread.java:3687)
E/AndroidRuntime(23066):  at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(23066):  at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(23066):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
E/AndroidRuntime(23066):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
E/AndroidRuntime(23066):  at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(23066): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1480]:  1343 unknown reloc type     7 @      (    0)
E/AndroidRuntime(23066):  at java.lang.Runtime.loadLibrary(Runtime.java:434)
E/AndroidRuntime(23066):  at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime(23066):  at com.rhomobile.rhodes.NativeLibraries.load(NativeLibraries.java:6)
E/AndroidRuntime(23066):  at com.rhomobile.rhodes.RhodesApplication.(RhodesApplication.java:57)
E/AndroidRuntime(23066):  ... 16 more

Could anyone help me...Thanks in advance..

Ramprasad.V

Please Register or Login to post a reply

3 Replies

A Alexey Tikhvinsky

Are you sure you have a valid library?

This message says that the format of your library is incorrect, e.g.: the file is not a library at all or build for another CPU...

Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: get_lib_extents[743]:  1913 data/data/com.rhomobile.neproject/lib/libSomething.so is not a valid ELF object

K Kutir Mobility

Ramprasad,
Have you checked @Alexel response ?

Visnupriya R
Kutir Mobility

M Michael Toews

Try this doc on adding libraries to your rhodes app.

CONTACT
Can’t find what you’re looking for?