Android compilation on Windows (Quick overview)

Kim Kulling edited this page Sep 7, 2018 · 6 revisions

Android compilation is a bit troublesome.

If you're on Windows, you can compile Assimp using these:

The NDK version used to compile was r14b.

Sorry for not posting the details, as I'm a little busy now, but basically, you will:

  • Install the SDK and NDK (that are downloadable from Android Studio)
  • Thats important to check if all Android SDK envoriment variables are configured (here I have: ANDROID_NDK, JAVA_HOME, JDK_ROOT, NDK_HOME, NDKROOT)
  • Extract Android CMake Toolchain to any folder you want
  • Extract CM ake-GUI, and preferentially, extract Ninja at the same folder
  • Thats important to check if your system can find Ninja via envoriment variables. You should have your PATH variable pointing to Ninja folder
  • Start CMake-GUI, point the input folder to the folder where you extracted Assimp source
  • Set the output folder to any folder where you want the project to be build
  • Click on "Configure", and at the settings, select "Ninja Makefiles" specifying the toolchain
  • Select your extracted toolchain path in the textbox
  • If everything is ok, CMake-GUI will expand all Assimp compilation options, you can leave them that way, only disabling STL importer, as it´s not compilable for Android afaik
  • By clicking "Generate", CMake-GUI will generate the project at the folder you've previously selected
  • Start a Windows CMD session at the project folder (Shift+Right click on Explorer)
  • Type "Ninja" and press ENTER
  • If everything is ok, Ninja will build "" inside project "Code" folder

Here are the Toolchains I use for Android compiling on Windows (one for x86 architectures, and the another for armv7):

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.