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

Author Topic: Problem with building Android Project (ndk-build)  (Read 1906 times)

0 Members and 2 Guests are viewing this topic.

imnaero

  • Newbie
  • *
  • Posts: 3
    • View Profile
Problem with building Android Project (ndk-build)
« on: February 07, 2016, 11:53:53 pm »
Hello,
I've been having issues building Android all weekend and am currently stuck on running ndk-build.
I have been following this guide: https://github.com/SFML/SFML/wiki/Tutorial%3A-Building-SFML-for-Android

Here are the steps I have completed so far:
1. Downloaded Git, CMake, Android SDK & NDK, Apache Ant.
2. Set enviorenment variables for all of the above.
3. Cloned SFML source from Git
4. Made a build directory within SFML folder, and within that made an "armeabi-v7a" folder
5. Called this to create a project:

 cmake -DANDROID_NDK=<My android NDK location> -DANDROID_USE_STLPORT=TRUE -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..

Note: This returns a warning that CMAKE might not set STL properly.

6. Opened ALL-BUILD project in VS2012 and buildt ALL-BUILD (9/10 succeeded, 1 skipped)
7. Selected INSTALL within VS2012 and buildt INSTALL (1 succeeded, 9 skipped)
8. Within SFML/examples/android i have called

android update project --target "android-19" --path .

9. Edited my Applications.mk so that APP_STL := stlport_shared (This is what i think is setting STLPORT manually?)

10. Run ndk-build upon which i receive this error when building:

[armeabi-v7a] Compile++ thumb: sfml-example <= main.cpp
jni/main.cpp:1:27: fatal error: SFML/System.hpp: No such file or directory
#include <SFML/System.hpp>^

Does anyone know what I've missed / did incorrectly?
I've previously had this work with APP_STL := gnustl_shared but when i compiled my .apk later
it just opened and closed, which is described by Sonkun (forum user) as what will happen if you dont use stlport so it is to be expected.
« Last Edit: February 08, 2016, 12:13:32 am by imnaero »

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Problem with building Android Project (ndk-build)
« Reply #1 on: February 08, 2016, 06:35:54 am »
You must use MSYS on Windows, not VS.

Check this post.
I would like a spanish/latin community...
Problems building for Android? Look here

imnaero

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Problem with building Android Project (ndk-build)
« Reply #2 on: February 08, 2016, 06:34:17 pm »
Thank you, using MSYS worked.

 

anything