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

Author Topic: How to setup an android project.  (Read 3109 times)

0 Members and 1 Guest are viewing this topic.

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
How to setup an android project.
« on: May 21, 2015, 07:09:28 pm »
Is anyone here familiar with how to actually setup an android project, I am using VS13 with NVIDIA Nsight Tegra. Now do I need to use one of the Java project types provided by NVIDIA or a standard c++ project? Also would I link the .so files SFML provides like any other library or is the process different?

Thanks

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: How to setup an android project.
« Reply #1 on: May 21, 2015, 08:36:55 pm »
Have you seen this? The Wiki is usually a good place to find information if something is not on the homepage :)

I personally haven't used SFML on Android yet, but there are a few people around who have and may help you concretely.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: How to setup an android project.
« Reply #2 on: May 22, 2015, 12:25:24 am »
Yes, I have. That is the tutorial I followed to compile SFML, I just can't figure out what to do next. There is an unwritten section at the bottom of that called "Building and Executing the Android Example" this is where I am stuck, I can't figure out how to build the example, or my own project for that matter. Sorry if my first post was unclear.

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: How to setup an android project.
« Reply #3 on: May 22, 2015, 07:34:53 am »
I responsed here. For the example for android, the ABI is set to armeabi-v7a( jni/Application.mk)  so you need to be carefully what arhitecture the phone/simulator has. ( yes, you can add more/change values to the ABI).
« Last Edit: May 22, 2015, 07:54:00 am by AlexxanderX »
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: How to setup an android project.
« Reply #4 on: May 22, 2015, 11:31:52 am »
Have a look at this commit, which adds a simple/empty project template you can use (plus readme; builds with CMake, just set "CMAKE_SYSTEM_NAME" to "Android" to create a Nsight project).

https://github.com/MarioLiebisch/SFML/commit/42b14ddc5aab0dc9fde5e2d4e0c657a5506cbd5e

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: How to setup an android project.
« Reply #5 on: May 23, 2015, 04:21:59 am »
Okay, I tried your suggestions, and it seems promising, but I can't find out where to add the include directories, usually it is right in the project properties, but there is nothing in there in this project. There is also no property for linking the libraries. So right now I have the empty project supplied, and errors stating <SFML/System.hpp> and so on can not be included.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: How to setup an android project.
« Reply #6 on: May 23, 2015, 11:57:42 am »
Those should be set by CMake. Or are you talking about your own? Also note that the template isn't 100% up to date, e.g. you'd have to change the ABi to armeabi-v7a (which is now the default).

I'll try to find some time this weekend to possibly update it, since it seems like there's at least some interest in that. :)

R23MJ

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: How to setup an android project.
« Reply #7 on: May 23, 2015, 08:34:21 pm »
Okay, strange, I will rebuild SFML again and see what happens. That sounds great, let me know if/when you do update it. For now I'm going to rebuild and try the provided example.

 

anything