Android mupdf java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “atof”

后端 未结 1 639
太阳男子
太阳男子 2020-12-22 06:37

I am using mupdf to open a pdf file in my android app.The app crashes with this error.

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate s

相关标签:
1条回答
  • Google have moved some of the C standard library functions like atof() from being inline functions in header files to normal functions. The latest NDKs will default to building a .so that is only compatible with the latest Android devices that have the atof() function in the device's standard C library (libc.so). This means if you run a library on an older device that has an older version of the C library, you will get an error loading the dll as the expected atof() function will not exist.

    Have you tried setting this in your Application.mk:

    APP_PLATFORM := android-9
    

    This will cause the ndk compiler to build code compatible with older Android versions.

    You can also try downgrading your NDK installation to version 10b (this version predates the change where atof was moved from inline to part of libc so avoids the problem entirely).

    0 讨论(0)
提交回复
热议问题