gradle 将SDL3游戏移植到Android

fslejnso  于 2023-08-06  发布在  Android
关注(0)|答案(1)|浏览(146)

我一直在尝试将我的SDL3游戏移植到Android,应用程序构建,但打开应用程序后它立即崩溃,我查看了logcat,它打印出以下错误:错误

runtime.cc:699]     in call to FindClass
                                                                                                    runtime.cc:699]     from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class)
2023-07-03 20:15:55.504 20280-20280 libc                    org.home.koogel                      A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20280 (SDLActivity), pid 20280 (SDLActivity)
2023-07-03 20:15:56.495 20430-20430 DEBUG                   pid-20430                            A  Cmdline: org.home.koogel
2023-07-03 20:15:56.495 20430-20430 DEBUG                   pid-20430                            A  pid: 20280, tid: 20280, name: SDLActivity  >>> org.home.koogel <<<
2023-07-03 20:15:56.495 20430-20430 DEBUG                   pid-20430                            A        #10 pc 000000000023c2bb  /data/app/~~N53rLpZY9mh-E3GtGYnN6Q==/org.home.koogel-igXmQKQnrfbvP2nKt24nXg==/lib/x86_64/libSDL3.so (BuildId: 92dd810fbcc704969f477fe80d5f650c31ba6464)
2023-07-03 20:15:56.495 20430-20430 DEBUG                   pid-20430                            A        #11 pc 000000000023c1f6  /data/app/~~N53rLpZY9mh-E3GtGYnN6Q==/org.home.koogel-igXmQKQnrfbvP2nKt24nXg==/lib/x86_64/libSDL3.so (JNI_OnLoad+182) (BuildId: 92dd810fbcc704969f477fe80d5f650c31ba6464)
---------------------------- PROCESS ENDED (20280) for package org.home.koogel ----------------------------

字符串
它似乎找不到SDL,即使我已经在本地属性中指定了SDL的路径,并且它使用SDL库来构建。SDL活动:

protected String[] getLibraries() {
        return new String[] {
            "c++_shared",
            "SDL3",
            "loader",
            "image_engine",
            "image"
        };
    }

本地属性:

sdk.dir=/home/koogel/Android/Sdk
sdl3.dir=/home/koogel/SDL/
cmake.dir =/usr/

build.gradle

//adding of the SDL3 directory
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def sdl3Dir = properties.getProperty('sdl3.dir')
if (sdl3Dir == null)
{
    throw new IllegalArgumentException("no [sdl3.dir] property in [local.properties] file")
}


这实际上是我第二次返工这个项目作为最后一次的项目是建立与弃用的功能,并根据例子,现在我想使我自己的项目

dm7nw8vv

dm7nw8vv1#

问题在于名称空间的名称,名称空间应该是org.koogel,而不是koogel。

相关问题