运行 SDLCmakeDemo 报错解决

最近在学习 音视频,研究以下项目
https://github.com/deepsadness/SDLCmakeDemo

报错:
E/SDL: nativeRunMain(): Couldn't load library /data/app/~~zRRtOIXDYMcWsK4U8POpQQ==/com.cry.cry.sdlcmakedemo-Sl4y09lmAeHWDksPy-fqHA==/lib/arm/libmain.so

解决方法:
https://stackoverflow.com/questions/55804006/dlopen-failedreturn-null-when-add-sdl2-to-android-project

修改 SDL2/CMakeLists.txt 文件(可以使用全局搜索 CTRL+SHIFT+F,搜索(find_library(ANDROID_DL_LIBRARY dl))快捷定位)
find_library(ANDROID_DL_LIBRARY dl) 为
find_library(ANDROID_DL_LIBRARY NAMES libdl.so dl)

你可能感兴趣的:(运行 SDLCmakeDemo 报错解决)