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

Author Topic: Android - Ant build error taskdef needed class not found  (Read 1710 times)

0 Members and 1 Guest are viewing this topic.

Tijmen

  • Newbie
  • *
  • Posts: 12
    • View Profile
Android - Ant build error taskdef needed class not found
« on: February 13, 2018, 08:28:00 pm »
Intro
Hey all, this is my first post on the SFML forums. I have been using SFML now for a few years on both Windows and Linux. Liked it so much I decided to use it for my bachelor's project! For linux/windows I have build a small game that we would like to test on a device with touchscreen. Don't have a Windows tablet, but do have several android devices! Hence I ventured into building SFML for Android and hopefully porting my application over at some point.

Environment variables
  • Using Windows 10 x64 build 1709
  • Using the SFML 2.4.2 source from the website
  • Using Visual Studio 2017 Community 15.5.6
  • Using Cmake version 3.6.2
  • Using Android NDK r12b
  • Using Android Command line tools r25.2.3
  • Using Android API 21
  • Ant 1.10.2

Cmake is configured for:
  • ANDROID_ABI = armeabi-v7a
  • ANDROID_API_MIN = 9
  • ANDROID_NATIVE_API_LEVEL = 21
  • ANDROID_STL = gnustl_shared
The rest is left at their default values.

I am following this tutorial: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android

Problem description
See my second post ;D
« Last Edit: February 19, 2018, 11:22:44 am by Tijmen »

Tijmen

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Android - Undefined errors XOR missing headers
« Reply #1 on: February 15, 2018, 03:34:08 pm »
Well, I tried using the VS2017 Community tools instead. Had the same issues. After toying around with the ANDROID_STL values I have found that "gnustl_shared" works for me, in combination with nmake.

So I get to go a few steps further into the process before I hit the next wall. When running
(click to show/hide)
The results are
(click to show/hide)

As a complete non expert on this I decided to check up on the files, which seem to be there in D:\SDK\android-sdk\tools\lib\ . Also, my ANDROID_NATIVE_API_LEVEL refuses to change from 9 when using the "NMake Makefiles" generator. Weird. Anyone any clues on this?

Edit0 Switching to the newest commandline toolset did not make a difference (https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip).

Edit1 Using NDK r12b in combination with android api 21 makes no difference to this error either. Seems to me that the SDK / Ant combination is incompatible.
« Last Edit: February 16, 2018, 02:08:20 pm by Tijmen »

Tijmen

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Android - Ant build error taskdef needed class not found
« Reply #2 on: February 19, 2018, 01:07:22 pm »
Using the option "c++_shared" works with the "NMake Makefiles" generator in CMake (why it does now, I don't know). The end result is however still the same:
(click to show/hide)

I get the feeling the tutorial is incomplete on what exactly needs to be done with the android-sdk. Simply downloading it can't be the answer, since you need to install platform-tools and an android API version (e.g. android-21). Anyone with ideas that I could try in that regard?

 

anything