1
votes

How do I put it to QMake to correctly generate the Makefiles to use the android platform-version I desire? I am trying to use NDK 14b with platform 21, however QMake always generates makefiles which target version 16 (which misses the stuff I need).

I'm using Qt 5.9.1 with Qt for Android Extras. I'm building to Android, armabiv7a with GCC 4.9. I am on Android NDK version 14b (which is a bit older, but definitely has support for platform 21).

I have specified

  • The sysroot for the Android Kit points to the folder for android-21
  • The android build SDK is android-26
  • There is an android manifest file. It sets the minimum required SDK to API 21, the Target SDK to API 24.

Qt Creator does not voice any qualms about the Kit (although I am suffering from the issue that it spam-generates defunct android kits en masse, but I do not believe this to be related to the problem I'm having here).

Am I missing something here?

1
Using new versions of the android toolchain doesn't sit well with qt... or vice versa I guess. The doc recommends ndk v10. - dtech
I won't argue against that, but there must be a way to override that behavoir, surely. - dxdy
Surely - qt is open source, so go ahead and make it work :) - dtech

1 Answers

5
votes

The trick is to set the environment variable ANDROID_NDK_PLATFORM to android-21 this can be done in Qt Creator in the project tab. I had to force a clean after doing this before it worked.