Skip to content

Commit

Permalink
Fixed bug 4002 - Android, nativeRunMain() fails on some phone with ar…
Browse files Browse the repository at this point in the history
…m64-v8a

Sylvain

The issue is totally reproducible on P8 Lite.

"The dlopen() call doesn't include the app's native library directory. The behavior of  dlopen() by Android is not guaranteed".

Workaround in getMainSharedObject()

Just replace
    return library;
with
    return getContext().getApplicationInfo().nativeLibraryDir + "/" + library;
  • Loading branch information
slouken committed Sep 5, 2018
1 parent 80021c2 commit a0b3dcc
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -121,7 +121,7 @@ protected String getMainSharedObject() {
} else {
library = "libmain.so";
}
return library;
return getContext().getApplicationInfo().nativeLibraryDir + "/" + library;
}

/**
Expand Down

0 comments on commit a0b3dcc

Please sign in to comment.