About Store Forum Documentation Contact



Post Reply 
java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
Author Message
DoerrSt Offline
Member

Post: #1
java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
Hi,

with todays update (or due to my changes?) my application crashes on android before the logo was shown.

It looks like it is caused by a problem with the application, not with my code - or?

Unfortunately I did some changes in the last days and tried it today the first time again.

It works fine on windows.

Thanks!



Time(23:31:51), App(ActivityManager): Start proc de.giminisoft.rpg for activity de.giminisoft.rpg/.EsenthelActivity: pid=24049 uid=10242 gids={50242, 1015, 3003, 1028}
Time(23:31:52), App(Finsky): [9678] InAppBillingUtils.getPreferredAccount: de.giminisoft.rpg: Account from first account - [xxxxxxxxxxxxx]
Time(23:31:52), App(Finsky): [9679] InAppBillingUtils.getPreferredAccount: de.giminisoft.rpg: Account from first account - [xxxxxxxxxxxxx]
Time(23:31:52), App(dalvikvm): Trying to load lib /data/app-lib/de.giminisoft.rpg-2/libProject.so 0x41978fb0
Time(23:31:52), App(dalvikvm): Added shared lib /data/app-lib/de.giminisoft.rpg-2/libProject.so 0x41978fb0
Time(23:31:52), App(dalvikvm): No JNI_OnLoad found in /data/app-lib/de.giminisoft.rpg-2/libProject.so 0x41978fb0, skipping init
Time(23:31:52), App(dalvikvm): No implementation found for native Lcom/esenthel/Native;.connected:(ZZ)V
Time(23:31:52), App(AndroidRuntime): Shutting down VM
Time(23:31:52), App(dalvikvm): threadid=1: thread exiting with uncaught exception (group=0x416048b0)
Time(23:31:52), App(AndroidRuntime): FATAL EXCEPTION: main
Time(23:31:52), App(AndroidRuntime): java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connected:(ZZ)V
Time(23:31:52), App(AndroidRuntime): at com.esenthel.Native.connected(Native Method)
Time(23:31:52), App(AndroidRuntime): at de.giminisoft.rpg.EsenthelActivity$1.onServiceConnected(EsenthelActivity.java:12​0)
Time(23:31:52), App(AndroidRuntime): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1113)
Time(23:31:52), App(AndroidRuntime): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1130)
Time(23:31:52), App(AndroidRuntime): at android.os.Handler.handleCallback(Handler.java:730)
Time(23:31:52), App(AndroidRuntime): at android.os.Handler.dispatchMessage(Handler.java:92)
Time(23:31:52), App(AndroidRuntime): at android.os.Looper.loop(Looper.java:213)
Time(23:31:52), App(AndroidRuntime): at android.app.ActivityThread.main(ActivityThread.java:5225)
Time(23:31:52), App(AndroidRuntime): at java.lang.reflect.Method.invokeNative(Native Method)
Time(23:31:52), App(AndroidRuntime): at java.lang.reflect.Method.invoke(Method.java:525)
Time(23:31:52), App(AndroidRuntime): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
Time(23:31:52), App(AndroidRuntime): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
Time(23:31:52), App(AndroidRuntime): at dalvik.system.NativeStart.main(Native Method)
Time(23:31:52), App(ActivityManager): Force finishing activity de.giminisoft.rpg/.EsenthelActivity
02-27-2014 11:48 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
Hi,

the functions are included in the engine:
Code:
#ifdef ANDROID
extern "C"
{
/******************************************************************************/
JNIEXPORT void JNICALL Java_com_esenthel_Native_connected(JNIEnv *env, jobject obj, jboolean supports_items, jboolean supports_subs)
Can you try doing "build/clean", and then building again?
02-28-2014 12:00 AM
Find all posts by this user Quote this message in a reply
DoerrSt Offline
Member

Post: #3
RE: java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
Hi,

after clean/clean all/build still the same crash here.

No need to hurry, it's already late and I will try tomorrow again.

If you need any addtional information please let me know.

Thanks for your extremly fast answer to this!
02-28-2014 12:20 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
I was able to reproduce this and I'm investigating this right now.
02-28-2014 01:36 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
The problem was that the C++ linker stripped those functions because it thought they won't be used.
I was able to fix this, and uploading the fix right now for Windows.
In the meantime you can prevent the functions from being stripped by calling NS.appLicenseKey(S); in InitPre
02-28-2014 02:10 AM
Find all posts by this user Quote this message in a reply
DoerrSt Offline
Member

Post: #6
RE: java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
Thanks you very much! I can confirm the issue is fixed with the current update.
02-28-2014 10:44 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: java.lang.UnsatisfiedLinkError: Native method not found: com.esenthel.Native.connecte
Hi, this was related to Android compilation (not VS).
03-02-2014 09:10 AM
Find all posts by this user Quote this message in a reply
Post Reply