gpt4 book ai didi

找不到 Android UnsatisfiedLinkError native 方法

转载 作者:太空狗 更新时间:2023-10-29 15:06:47 28 4
gpt4 key购买 nike

我正在构建原生应用。当我想启动这个应用程序时,logcat 说

FATAL EXCEPTION: SDLThread
Process: org.libsdl.app, PID: 1560
java.lang.UnsatisfiedLinkError: Native method not found: org.libsdl.app.SDLActivity.nativeInit:()V
at org.libsdl.app.SDLActivity.nativeInit(Native Method)
at org.libsdl.app.SDLMain.run(SDLActivity.java:421)
at java.lang.Thread.run(Thread.java:841)

库已正确加载。

Trying to load lib /data/app-lib/org.libsdl.app-1/libSDL2.so 0xb1ddc818
Added shared lib /data/app-lib/org.libsdl.app-1/libSDL2.so 0xb1ddc818
Trying to load lib /data/app-lib/org.libsdl.app-1/libmain.so 0xb1ddc818
Added shared lib /data/app-lib/org.libsdl.app-1/libmain.so 0xb1ddc818
No JNI_OnLoad found in /data/app-lib/org.libsdl.app-1/libmain.so 0xb1ddc818, skipping init

在main.so我可以看到

T Java_org_libsdl_app_SDLActivity_nativeInit

最佳答案

如果使用SDL_Main作为入口需要调用

void SDL_SetMainReady(void)

在 SDL_Init() 之前那里有详细信息:http://wiki.libsdl.org/SDL_SetMainReady

关于找不到 Android UnsatisfiedLinkError native 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21259082/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com