title: Issue with "CMake Error: CMAKE_C_COMPILER not set", but cannot update environment
body: <p>I know similar questions have been asked, but none that fit my problem exactly.</p>
  
  <p>I am working on an android project, using Android Studio. I am adding a C++ library to the existing project.</p>
  
  <p>Here is my problem : When I attempt to compile, I receive this error message :</p>
  
  <pre><code>Build command failed.
  
  
  Error while executing process /home/v/opt/cmake/3.6.4111459/bin/cmake with arguments {-H/home/v/proj/code/android/cppmanager -B/home/v/proj/code/android/tooltipgenerator/.externalNativeBuild/cmake/release/armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=/home/v/opt/ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/android/tooltipgenerator/intermediates/cmake/release/obj/armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/home/v/opt/cmake/3.6.4111459/bin/ninja -DCMAKE_TOOLCHAIN_FILE=/home/v/opt/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-16}
  
  
   (include)   CMakeLists.txt 
  Open File
  
  
  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
  
  
  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
  
  
  -- Configuring incomplete, errors occurred!
  </code></pre>
  
  <p>When I click on "Open file" it opens <code>ndk-bundle/build/cmake/android.toolchain.cmake</code> to line 312.</p>
  
  <pre><code># ABI.
  set(CMAKE_ANDROID_ARCH_ABI ${ANDROID_ABI})
  if(ANDROID_ABI STREQUAL armeabi-v7a)
    set(ANDROID_SYSROOT_ABI arm)
    set(ANDROID_TOOLCHAIN_NAME arm-linux-androideabi)
    set(ANDROID_TOOLCHAIN_ROOT ${ANDROID_TOOLCHAIN_NAME})
    set(ANDROID_HEADER_TRIPLE arm-linux-androideabi)
    set(CMAKE_SYSTEM_PROCESSOR armv7-a)
    set(ANDROID_LLVM_TRIPLE armv7-none-linux-androideabi)
  elseif(ANDROID_ABI STREQUAL arm64-v8a)
    set(ANDROID_SYSROOT_ABI arm64)
    set(CMAKE_SYSTEM_PROCESSOR aarch64)
    set(ANDROID_TOOLCHAIN_NAME aarch64-linux-android)
    set(ANDROID_TOOLCHAIN_ROOT ${ANDROID_TOOLCHAIN_NAME})
    set(ANDROID_LLVM_TRIPLE aarch64-none-linux-android)
    set(ANDROID_HEADER_TRIPLE aarch64-linux-android)
  elseif(ANDROID_ABI STREQUAL x86)
    set(ANDROID_SYSROOT_ABI x86)
    set(CMAKE_SYSTEM_PROCESSOR i686)
    set(ANDROID_TOOLCHAIN_NAME i686-linux-android)
    set(ANDROID_TOOLCHAIN_ROOT ${ANDROID_ABI})
    set(ANDROID_LLVM_TRIPLE i686-none-linux-android)
    set(ANDROID_HEADER_TRIPLE i686-linux-android)
  elseif(ANDROID_ABI STREQUAL x86_64)
    set(ANDROID_SYSROOT_ABI x86_64)
    set(CMAKE_SYSTEM_PROCESSOR x86_64)
    set(ANDROID_TOOLCHAIN_NAME x86_64-linux-android)
    set(ANDROID_TOOLCHAIN_ROOT ${ANDROID_ABI})
    set(ANDROID_LLVM_TRIPLE x86_64-none-linux-android)
    set(ANDROID_HEADER_TRIPLE x86_64-linux-android)
  else()
    set(ANDROID_ABI_ERROR "")
    if(ANDROID_ABI STREQUAL armeabi)
      set(ANDROID_ABI_ERROR " (armeabi is no longer supported. Use armeabi-v7a.)")
    elseif(ANDROID_ABI MATCHES "^(mips|mips64)$")
      set(ANDROID_ABI_ERROR " (MIPS and MIPS64 are no longer supported.)")
    endif() // line 312
    message(FATAL_ERROR "Invalid Android ABI: ${ANDROID_ABI}.${ANDROID_ABI_ERROR}")
  endif()
  </code></pre>
  
  <p>Other questions/answers like <a href="https://stackoverflow.com/a/50759336/8154557">this one</a> suggest updating  gradle. I have also found suggestions to update the SDK, the NDK... which seems like a good idea, except this would break my existing project.</p>
  
  <p>I am running Android Studio 3.1.3, and Gradle 2.3.3</p>
  
  <p>Here is an extract from my main build.gradle</p>
  
  <pre><code>android {
      compileSdkVersion 27
      buildToolsVersion "27.0.3"
  
      defaultConfig {
          applicationId "info.proj"
          minSdkVersion 16
          targetSdkVersion 27
          versionCode 82
          versionName "b-1.5.2"
          multiDexEnabled = true
  
          ndk {
              abiFilters "armeabi-v7a", "x86"
          }
      }
  }
  </code></pre>
  
  <p>Is there any way I can solve this issue without upgrading my build environment ? </p>
  
  <p>I have already payed around a bit with abiFilters, with no success... but maybe I just played around wrong ?</p>
  
  <p>I have also already tried updating gradle, but it did not fix anything and instead broke the rest of the project.</p>
  
  <p>I have been racking my brain for quite a while now, so any suggestion would be appreciated. thanks.</p>