[Interest] Qt Android: how to set __ANDROID_API__ ?

Alexander Dyagilev alervdvcw at gmail.com
Tue Jan 25 23:48:18 CET 2022


Hello,

You need to define ANDROID_NDK_PLATFORM environment variable. You can do 
it by changing it in Qt Creator:

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
> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220126/7273b631/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vuL7LQVApHbbgXEe.png
Type: image/png
Size: 2232 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220126/7273b631/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Zl46g7TLYHG3Kn00.png
Type: image/png
Size: 15442 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220126/7273b631/attachment-0001.png>


More information about the Interest mailing list