Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. __ANDROID_API__ define has a strange behavior
Forum Updated to NodeBB v4.3 + New Features

__ANDROID_API__ define has a strange behavior

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 901 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    daviraim
    wrote on last edited by
    #1

    Hi Forum,

    I was wondering why the ANDROID_API define on the compile line is not set with the requested version which is defined in the AndroidManifest.xml. If you modify that information in the manifest file, then save & exit, the define is set with the correct value (21). If you open a project without editing the manifest file, that define is set with the defaut API version (16). I tried to set env var's and force the Android build sdk to android-21 in the project buid settings but the result is the same (the compile cmdline always use the android-16 version).

    the only solution I have found is to systematically edit the manifest, change it, save it to another version and return to the desired version by doing the same operation.
    Current config : QtCreator 4.6.1/ Android for armeabi-v7a (GCC4.9, Qt5.11.0)/NDK r10e

    Any idea about that behavior ?
    Thanks a lot.
    David.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be a Qt Creator issue, can you try with a more recent version ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        daviraim
        wrote on last edited by
        #3

        Hi Samuel,
        Apparently, it is the same thing with QtCreator 4.8.0.
        Thanks.
        David.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          daviraim
          wrote on last edited by
          #4

          Hi all,
          I switched to the following configuration : Qt5.12, QtCreator 4.8.0, NDK r18b, Clang++ compiler and the issue no longer occurs.
          Regards,
          David.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved