title: Invalid revision: 3.18.1 CMake in Android Studio
body: <p>This is not a question, it is a solution for a technical problem with android studio which I have meet. I will share my doing to fix the error if any one would encounter.
  The brief error message is: <strong>&quot;Invalid revision: 3.18.1-g262b901&quot;</strong>, while 3.18.1 is latest CMake version in Android studio. But the problem is my project is old and it builds failed with this CMake version. There are 2 solutions, you can choice 1 in 2:
  -<strong>Remove(uninstall) CMake</strong> version 3.18.1: Click Android Studio-&gt;Preferences-&gt;Appearance &amp; Behavior-&gt;System Settings-&gt;Android SDK-&gt;SDK Tool-&gt;(enable the Show Package Details checkbox)-&gt;CMake-&gt;Uncheck 3.18.1 checkbox, then click Apply button in right-bottom conner of dialog.
  -<strong>Set directory path</strong> of lower-version CMake in the local.properties file by adding this line to this file: <em><code>cmake.dir=/Users/admin/Library/Android/sdk/cmake/3.10.2.4988404</code></em> <em>(The CMake path can be different in your computer)</em></p>
  <p>Long error message(a small part):</p>
  <p>*</p>
  <pre><code>at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94)
      at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:89)
  Caused by: java.lang.NumberFormatException: Invalid revision: 3.18.1-g262b901
      at com.android.repository.Revision.parseRevision(Revision.java:133)
      at com.android.repository.Revision.parseRevision(Revision.java:155)
      at com.android.build.gradle.external.cmake.CmakeUtils.getVersion(CmakeUtils.java:51)
      at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.createCmakeExternalNativeJsonGenerator(ExternalNativeJsonGenerator.java:688)
  </code></pre>
  <ul>
  <li></li>
  </ul>
  <p>Hope it help!</p>