Android NDK UnsatisfiedLinkError: “dlopen failed: empty/missing DT_HASH”

前端 未结 7 2314
迷失自我
迷失自我 2021-02-08 06:50

I am tracking down crashes with our Android application (which uses the NDK to load a C++ library) using a crash reporting service. A small number of users are experiencing the

7条回答
  •  不思量自难忘°
    2021-02-08 07:10

    The library you are trying to load was most likely built with -Wl,--hash-style=gnu. This was not supported on Android until recently (afaik this isn't even in L). You need to build your libraries with -Wl,--hash-style=sysv.

    How did you build cpplibrary.so? If you didn't do anything to manually switch to the gnu hash style, it could be a bug in the NDK.

提交回复
热议问题