0

I am using libstandalonelibwebviewchromium.so in my android application and when I am calling a native method it throws "java.lang.UnsatisfiedLinkError: No implementation" . I have looked into this issue and found out that name of the function is different in the library. I have used "nm -gD libstandalonelibwebviewchromium.so" command to list all the methods. For example :

method "org_chromium_base_library_1loader_LibraryLoader_registerNonMainDexJni" changed to "Java_J_N_MIOj213u".

How to configure chromium at the build time to preserve original library method name??

Please help....

Thank You,

Avishek Nath

////////////////////////////////// EDIT /////////////////////////////////

For the Android Chromium source checkout I have followed this link : https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md

  1. I have checked out Chromium source code for Android from github.
  2. Then I ran these commands in ubuntu system
    $ gclient sync
    $ gn gen --args='target_os="android" target_cpu="arm" is_debug=false' out/Default
    $ ninja -C out/Default webview_instrumentation_apk
  3. After these command execution "libstandalonelibwebviewchromium.so" generated in the out/Default folder.

I have taken the libstandalonelibwebviewchromium.so in my project and kept it in the jniLibs folder.

I also ran this "nm -gD libstandalonelibwebviewchromium.so" command which gave a list of symbols but all of them are like "Java_J_N_MIOj213u".

  • That sounds like a Proguard issue, but I have no idea how that fits in to the Chromium build process. Where did you get this library from? Did you build it yourself? – Botje Jul 06 '20 at 11:50
  • I am using chromium source code to produce the apk. Everything is working but the JNI shared library(.SO file) methods are not accessible, for an example one of the method name is Java_J_N_MIOj213u but its not a valid one according to the JNI instruction. I have used this link for build instruction https://www.chromium.org/developers/how-tos/build-instructions-android-webview – Avishek Nath Jul 06 '20 at 12:29
  • You should edit your question with details on how you included chromium in your build. – Botje Jul 06 '20 at 12:31

0 Answers0