1

We have an Android app with multiple native libraries. On all locally available Test devices it works just fine. On one device in googles pre launch report the app crashes when loading one of the native libraries:

FATAL EXCEPTION: main
Process: com.mycompany.MyApp, PID: 20991
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol"_ZNSt6__ndk16chrono12system_clock9to_time_tERKNS0_10time_pointIS1_NS0_8durationIxNS_5ratioILl1ELl1000000EEEEEEE" referenced by "/data/app/com.mycompany.MyApp-1/lib/arm64/libmy-nativelib.so"...

We use c++_shared as stl. Also I can not find a usage of that specific symbol in our code. The chrono header is used, but not that symbol. All libs are available in the abis we support.

The failing device is P8 Lite. Could this be a device specific issue?

Edit: We were just able to reproduce this issue with one of our test devices. It seems to be an issue related to android 5.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Arne Fischer
  • 922
  • 6
  • 27
  • _"We use c++_shared as stl"_ And you're bundling `libc++_shared.so` with your app? – Michael Jun 19 '20 at 09:05
  • no libc++_shared.so is provided by the android ndk – Arne Fischer Jun 19 '20 at 09:06
  • Right. But are you bundling it with your app? [The documentation](https://developer.android.com/ndk/guides/cpp-support) says that you must: _" libc++ is not a system library. If you use libc++_shared.so, it must be included in your APK. If you're building your application with Gradle this is handled automatically"_. So have you verified that libc++_shared.so is inluded in your APK? – Michael Jun 19 '20 at 09:11
  • Yes it is bundled with our app. I unzipped the apk and as expected it is there. – Arne Fischer Jun 19 '20 at 09:18

0 Answers0