-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to get the ARM64 Android libSDL2.so ? #146
Comments
What I do for Android ports of my Pascal games is I build SDL2 from source using the Android NDK. This works fine for FPC; no idea about Delphi. |
I also compiled it using the Android NDK, and after compilation, a libMain.so file is generated. Do you have this file generated as well? If this file is generated, it cannot be called using languages other than Java. Could you send me the libSDL2.so file you generated so I can test it? |
After building, I get |
i built it with ndk-build I developed an Android application using Delphi development tool, but after directly calling the libSDL2.so, SDL cannot be initialized, and the application crashes unexpectedly. It's strange, I've tried many different versions of libSDL2.so, including compiling the official SDL source code with NDK to generate libSDL2.so, but none of them can be called by other Android development tools except for Java in Android Studio. I don't understand why this is happening. my code is : {$IFDEF ANDROID} FixupStub(ALibFile, AHandle, 'JNI_OnLoad', Addr(JNI_OnLoad)); if Assigned(JNI_OnLoad) then {$ENDIF} the issue comes from here, when i call JNI_OnLoad(), it will rasie an exception and the app will crash. the log information is : JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.ClassNotFoundException: Didn't find class "org.libsdl.app.SDLActivity" on path: DexPathList... attention, i am not using Android Studio and not using java, i am using Delphi, it is Pascal language i think your libSDL2.so is only for java using, can not be called via the other development tool and language so i hope can use your built file , try it again , if possible could you send your libSDL2.so file to [email protected] ? thank you very much. |
I think the issue here is that Footnotes |
yes, i am clear , but i have another libSDL2.so file which is v2.0.0 and it was compiled to armeabi-v7a, it can be called by Delphi directly. :( only use System.LoadLibrary and every functions in libSDL2.so can be called with not any problems. |
I have been searching for the ARM64 SDL2.so library file for Android for a long time, and I have downloaded several versions of the SDL2 source code and compiled libSDL2.so myself, but none of them can be used directly in Delphi. After some research, I found that some people say SDL2 for Android can only be called using Java in Android Studio. Is that true?
The text was updated successfully, but these errors were encountered: