Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How do you compile SFML 2.2 to Android?  (Read 3006 times)

0 Members and 1 Guest are viewing this topic.

shippage

  • Newbie
  • *
  • Posts: 1
    • View Profile
How do you compile SFML 2.2 to Android?
« on: December 19, 2014, 11:23:56 am »
I'm have a problem trying to get the Android example running on my phone.

I did a clone of the SFML master git repo and imported the Android project in Android Studio. When I Run/Debug it just sits on "Waiting for device". When I replug-in my phone it detects the device but the app still doesn't appear.

Am I missing a step or doing something wrong? SFML's wiki on building for Android is seems outdated and is for CMake, I also tried this method before but had weird problems with Make.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: How do you compile SFML 2.2 to Android?
« Reply #1 on: December 19, 2014, 07:38:32 pm »
First, Android Studio doesn't support the NDK yet, so you can't use SFML/NDK with Android Studio. (you can when you know how to implement the native libs etc into gradle (build system))

So you have to use eclipse+adt+NDK, keep in mind that google stopped working on the ADT plugin. You will find in the Android/iOS thread a guide how to compile SFML and add in to "build-system/eclipse". http://en.sfml-dev.org/forums/index.php?topic=13716.msg96053#msg96053


SFML's wiki on building for Android is seems outdated and is for CMake, I also tried this method before but had weird problems with Make.

Nope. that is the way to go. But you have to use the "Make" provided by the NDK (On windows its something like NDK/prebuilt/windows/... (I'm on my phone so I can't tell you the full path)

AlexAUT
« Last Edit: December 19, 2014, 07:41:04 pm by AlexAUT »

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: How do you compile SFML 2.2 to Android?
« Reply #2 on: December 20, 2014, 05:13:43 am »
I'm wondering would we be able to use the Genymotion emulator to run an android sfml project rather than that thing that is built into eclipse?
I have many ideas but need the help of others to find way to make use of them.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: How do you compile SFML 2.2 to Android?
« Reply #3 on: December 20, 2014, 12:03:58 pm »
You'd have to ask the Genymotion people.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/