[Interest] Qt Android: how to set __ANDROID_API__ ?

Nuno Santos nuno.santos at imaginando.pt
Mon Jan 31 11:40:57 CET 2022


Alexander,

Thanks for your reply.

In the mean time I have discovered that I had to change ANDROID_NDK_PLATFORM env var to android-23. By default it was set to android-21.

Best regards,

Nuno

> On 25 Jan 2022, at 22:50, Alexander Dyagilev <alervdvcw at gmail.com> wrote:
> 
> Sorry, forgot to say. As far as I know, the default value for Qt 5.x is:
> 
> ANDROID_NDK_PLATFORM=16
> 
> On 1/26/2022 1:48 AM, Alexander Dyagilev wrote:
>> Hello,
>> 
>> You need to define ANDROID_NDK_PLATFORM environment variable. You can do it by changing it in Qt Creator:
>> 
>> <vuL7LQVApHbbgXEe.png>
>> 
>> <Zl46g7TLYHG3Kn00.png>
>> 
>> Or by changing using system's environment variables.
>> 
>> I use Qt 5.12 so I set it to ANDROID_NDK_PLATFORM=21.
>> 
>> For Qt 6.x, the default value (if not set by environment variable) is ANDROID_NDK_PLATFORM=23.
>> 
>> 
>> 
>> On 1/25/2022 2:57 PM, Nuno Santos wrote:
>>> Hi,
>>> 
>>> I’m trying to call get_nprocs which is defined on #include <sys/sysinfo.h>
>>> 
>>> But it doesn’t get included because there is a macro making it available only when __ANDROID_API__ is >= 23
>>> 
>>> Qt Creator installs by default NDK 21.3.6528147.
>>> 
>>> Is this something defined at the NDK level? Or is this something we can set as a parameter somewhere, because I can’t find it… 
>>> 
>>> Thanks!
>>> 
>>> Nuno
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org <mailto:Interest at qt-project.org>
>>> https://lists.qt-project.org/listinfo/interest <https://lists.qt-project.org/listinfo/interest>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220131/aecbe75e/attachment.htm>


More information about the Interest mailing list