Hey,
I am trying to follow the guide with SFML 2.6 on android
https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android-on-Windows-with-Android-StudioBuild passed but on execution I have a fatal error :
2023-08-15 12:55:24.780 20653-20653 libEGL com.you.example.debug E validate_display:89 error 3001 (EGL_NOT_INITIALIZED)
2023-08-15 12:55:24.781 20653-20653 libc com.you.example.debug A C:\FactoryCapi\external_deps\SFML\src\SFML\System\Android\Activity.cpp:75: sf::priv::ActivityStates &sf::priv::getActivity(): assertion "states != NULL" failed
2023-08-15 12:55:24.781 20653-20653 libc com.you.example.debug A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20653 (u.example.debug), pid 20653 (u.example.debug)
I am using several libraries with SFML but I already made a simple project to check them and it was ok (launched as expected).By simple project I mean a single main.cpp that calls some methods of each lib, so a very simple cmake.
But now I'm using my full source of my game with intermediate lib building and I have this error.
Just want to know if some of you already dealt with this, or have any idea about where the problem could come from.
The error occurred before the main is executed.
To give a little bit more information, here is my cmake lib dependency flow:
The example lib finally built relies on a custom lib FactoryCapi_flow
target_link_libraries(example PUBLIC
FactoryCapi_flow
log
android
sfml-graphics
sfml-audio
sfml-activity
sfml-network
-Wl,--whole-archive sfml-main -Wl,--no-whole-archive
TGUI::TGUI
TGUI::Activity
EnTT::EnTT
openal
EGL
GLESv1_CM
)
FactoryCapi_flow relies on FactoryCapi_core
target_link_libraries(
FactoryCapi_flow PUBLIC
FactoryCapi_core
)
FactoryCapi_core is built with those lib
target_link_libraries(
FactoryCapi_core PUBLIC
sfml-graphics
sfml-system
absl::flags
absl::flags_parse
# gRPC::grpc++_reflection
gRPC::grpc++
protobuf::libprotobuf
quill::quill
)
In AndroidManifest.xml, I have
<meta-data android:name="android.app.lib_name" android:value="sfml-activity-d" />
<meta-data android:name="sfml.app.lib_name" android:value="tgui-activity-d" />
<meta-data android:name="tgui.app.lib_name" android:value="example" />
Thank you