title: Build release version of shared *.so library with Android Studio
body: <p>I am making a C++ share library for Android. I created new project with Android Studio and enabled C++.</p>
  
  <p><a href="https://i.stack.imgur.com/6lBs0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6lBs0.png" alt="enter image description here"></a></p>
  
  <p>I also enabled C++ 11 ans Exception support.</p>
  
  <p><a href="https://i.stack.imgur.com/yjsYb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yjsYb.png" alt="enter image description here"></a></p>
  
  <p>New project was created and the <code>build.gradle</code> and <code>CMakeLists.text</code> files were generated. The problem is that Adnroid Studio is only generating a Debug version of the *.so library. I need the release version to be generated too.</p>
  
  <p>The debug library is being generated at </p>
  
  <blockquote>
    <p>\app\build\intermediates\cmake\debug\obj\\libnative-lib.so</p>
  </blockquote>
  
  <p>I noticed there is another directory at </p>
  
  <blockquote>
    <p>\app\build\intermediates\cmake\debug\obj\</p>
  </blockquote>
  
  <p>but it is empty. It does not have the release version of the library.</p>
  
  <p>How can I force Android Studio to build/compile the release version of the *.so library. I put those images up to make sure that I didn't miss any step.</p>
  
  <p>Using <em>Android Studio 2.3</em>.</p>