Alia5 / SFML_AndroidStudio

Example of SFML in AndroidStudio with a bit of extra fluff on top
30 stars 3 forks source link

error: 'SFML/System.hpp' file not found #3

Open Mtkn573 opened 3 years ago

Mtkn573 commented 3 years ago

When trying to compile I got: C:\home\dev\git\SFML_AndroidStudio\app\src\main\cpp\main.cpp:1:10: fatal error: 'SFML/System.hpp' file not found

Mtkn573 commented 3 years ago

I fixed it by putting sfml into ndk sources folder. Now after application install I got:

2021-07-19 08:57:39.523 7703-7703/? E/AndroidRuntime: FATAL EXCEPTION: main Process: sfml.com.sfml_example, PID: 7703 java.lang.RuntimeException: Unable to start activity ComponentInfo{sfml.com.sfml_example/de.flatspotsoftware.testapp.activity.TestNativeActivity}: java.lang.IllegalArgumentException: Unable to find native library sfml-activity using classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/0JzcNLZrriXTGUDj6drW7g==/sfml.com.sfml_example-wQoGhb_4OdNHyYcOxZH6-w==/base.apk"],nativeLibraryDirectories=[/data/app/0JzcNLZrriXTGUDj6drW7g==/sfml.com.sfml_example-wQoGhb_4OdNHyYcOxZH6-w==/lib/arm64, /system/lib64, /system/system_ext/lib64]]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3797) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3973) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8528) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130) Caused by: java.lang.IllegalArgumentException: Unable to find native library sfml-activity using classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/0JzcNLZrriXTGUDj6drW7g==/sfml.com.sfml_example-wQoGhb_4OdNHyYcOxZH6-w==/base.apk"],nativeLibraryDirectories=[/data/app/0JzcNLZrriXTGUDj6drW7g==/sfml.com.sfml_example-wQoGhb_4OdNHyYcOxZH6-w==/lib/arm64, /system/lib64, /system/system_ext/lib64]]] at android.app.NativeActivity.onCreate(NativeActivity.java:164) at de.flatspotsoftware.testapp.activity.TestNativeActivity.onCreate(TestNativeActivity.java:66) at android.app.Activity.performCreate(Activity.java:8207) at android.app.Activity.performCreate(Activity.java:8191) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3770) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3973) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8528) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130) 2021-07-19 08:57:39.614 7703-7703/? I/Process: Sending signal. PID: 7703 SIG: 9