Skip to content
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

Android example does not provide the build files and directory structure for the Gradle build system #1311

Closed
pjmlp opened this issue Oct 27, 2017 · 10 comments

Comments

@pjmlp
Copy link
Contributor

pjmlp commented Oct 27, 2017

The provided Android example under examples/android/ does not provide the Android Studio project file structure, still makes use of the deprecated ndk-build files and does not provide the necessary Gradle configuration files.

I already have a private fork with these issues sorted out and can gladly do a push request.

@pjmlp pjmlp changed the title Android example does not compile with the new Gradle build system Android example does not provide the build files and directory structure for the Gradle build system Oct 27, 2017
@isubasinghe
Copy link

I am having trouble with the android example as well, it needs to be updated. Please update the tutorial as well

@pjmlp
Copy link
Contributor Author

pjmlp commented Nov 10, 2017

@isubasinghe You can have a look at the pull request, #1315.

@isubasinghe
Copy link

@pjmlp Thanks, I will try to compile it now.

@isubasinghe
Copy link

I couldnt get it to work still : ( , oh well. Android support is still experimental isnt it, its not worth trying to make my game in SFML when I could just use libgdx right? , since android is supported there, and most importantly I can get it to compile.

@pjmlp
Copy link
Contributor Author

pjmlp commented Nov 10, 2017

If you are fine with Java/Kotlin than it is probably better, unless you are quite comfortable with the NDK.

Have you tried to compile SFML with -DANDROID_STL=stlport_shared as explained on the Wiki?

@isubasinghe
Copy link

isubasinghe commented Nov 11, 2017

Yeah I am fine with using Java and I haven't really messed with the NDK before this.

image

I got it to compile though, I had to change the gradle version to 4.1 and add
"
sourceSets.main {
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
"
under defaultConfig

Thanks for the help and updating the Android build files.

@isubasinghe
Copy link

Ill probably stick to libgdx though for my Release version, I will rewrite it in SFML just for fun though.

@Alia5
Copy link

Alia5 commented Mar 19, 2018

Dunno, why this is on undiced, as NDK build, is considered deprecated for a long time, may someone enlighten me?

In any case here is a (somewhat incomplete) example.

@MarioLiebisch
Copy link
Member

Simply a lack of time in combination with not having all potential related issues in mind when working on a PR or anything similar. Building for Android has been updated in pull request #1350 and the last open adjustments to build the example with gradle are on my HDD, waiting for a few fixes and being pushed as a new PR.

@texus
Copy link
Contributor

texus commented Nov 17, 2023

This issue can be closed as this was already updated in SFML 2.5 in #1393

@eXpl0it3r eXpl0it3r added this to the 2.5 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants