How do I tell Android Studio to use GCC 4.9 with CMake?
Split your arguments
string into one string per argument:
arguments '-DBUILD_TESTING=OFF','-DANDROID_TOOLCHAIN=gcc'
I don't know if it's possible to explicitly specify version 4.9 of GCC ("gcc-4.9" didn't work). However, that's redundant anyway since GCC 4.8 was removed in NDK r11, so GCC 4.9 is now the only version of GCC included in the NDK, and ANDROID_TOOLCHAIN=gcc
therefore implicitly means GCC 4.9.