Building under Android for C++ using

Hello.

I want to use Panda3D on Android in C++ code. First of all I tried to build Panda3D for Android as static lib to link it to my test app. However I have a lot of errors. I used ndk r18. Here is log: https://justpaste.it/2p6yr
I compiled using this command line:

python makepanda/makepanda.py --nothing --target=android-29 --no-python --static

Also I read in doc, what building on Android is very experimental. Is it true? Maybe I shouldn’t try to build Panda3D for Android.

HI, welcome to the community!

Very strange, those errors. It appears something is wrong with your NDK somehow. Or the flags that Panda uses to compile with it.

Thanks.
What version of NDK do you recommend?
Could somebody shared environment settings, if he\she is able to build Panda for Android?

The latest NDK version should now work with the latest version of the master branch on GitHub.

You need to create a thirdparty directory and put the desired thirdparty packages in there. This is an archive containing the ones I used:
https://rdb.name/android-libs-arm64.tar.gz

This is the script I used to compile Panda3D (a version of Panda3D should already be installed on the system):

export ANDROID_SDK_ROOT=/home/rdb/local/android
python3.8 makepanda/makepanda.py --everything --outputdir built-android-arm64 --arch arm64 --target android-21 --threads 6 $@

Thank you very much. I will try this and will post my results.