title: Android Studio: Gives each variant its own icon
body: <p>In Android Studio, I want each of my app variant to have its own icon.</p>
  
  <p>I tried various ways, including what is suggested here
  <a href="https://stackoverflow.com/questions/22875948/how-to-provide-different-android-app-icons-for-different-gradle-buildtypes">How to provide different Android app icons for different gradle buildTypes?</a>
  but it doesn't work</p>
  
  <p>here is what I wrote in the build.graddle file:</p>
  
  <pre><code> flavorDimensions "marketplaceA"
  
      productFlavors {
          koanFlavor {
              dimension "marketplaceA"
              resValue "string", "app_name", "Koan"
              manifestPlaceholders = [
                      appIcon: "@mipmap/ic_launcher"
              ]
              minSdkVersion 20
              targetSdkVersion 27
              versionCode 3
              versionName '1.1'
          }
          koanSEFlavor {
              dimension "marketplaceA"
              resValue "string", "app_name", "Koan SE"
              manifestPlaceholders = [
                      appIcon: "@mipmap/ic_launcher"
              ]
              minSdkVersion 20
              targetSdkVersion 27
              versionCode 3
              versionName '1.1'
          }
          } 
  </code></pre>
  
  <p>And, since I share the same res in every variant:</p>
  
  <ul>
  <li><p>I didn't make a res folder for each variant </p></li>
  <li><p>I filled the mipmapXXX folder of the main res folder with 2 versions of the xml and png files</p></li>
  </ul>
  
  <p>but the icon doesn't show up when I run the app in the emulator
  (weird thing it that it does show only on my shield K1 tablet, every other smatphone I tried doesn't show the icon)</p>
  
  <p><strong>Update:</strong> </p>
  
  <p>I just tried adding the mipmapXXX folders to each variants folders, keeping the exact same name on every resources, only changing the content of the png but still...</p>
  
  <p>Could my problem come from my launcher.xml ?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;background android:drawable="@drawable/ic_launcher_background" /&gt;
      &lt;foreground android:drawable="@drawable/ic_launcher_foreground" /&gt;
  &lt;/adaptive-icon&gt;
  </code></pre>
  
  <p>In Android studio, when you open the ic_launcher.xml file, you see the icon in the previewx tab.
  Right now I only see the default icon :S</p>
  
  <p><strong>Update II:</strong></p>
  
  <p>The thing is I went for the solution where I put this in build.gradle for each variant</p>
  
  <pre><code>    manifestPlaceholders = [
              appIcon: "@mipmap/ic_launcher"
      ]
  </code></pre>
  
  <p>and then place 2 ic_launcher files in the default folder.
  I had to add in the manifest</p>
  
  <pre><code> android:icon="${appIcon}"
  </code></pre>
  
  <p>I think it is a bad solution :(</p>
  
  <p>I'm now trying to go for @W0rmH0le solution but something isn't right</p>
  
  <p>How to I get rid of adaptive icon in favor of my simple icon ?</p>
  
  <p><strong>FINAL UPDATE:</strong></p>
  
  <p>Tips from @W0rmH0le and @Derek really helped but here is the information that could have help me a lot to solve my problem:</p>
  
  <p>1) the New -> Image Asset UI in AS is the only way to go and you can use it again and again the try to get to your desired icon</p>
  
  <p>2) Once you finished with the Image Asset UI, do a "Build -> Clean Project" and a "Build -> Rebuild Project"</p>
  
  <p>3) At this stage you'd better use adaptive-icon since the systems your app will run on might turn your icon into something ugly if you don't</p>
  
  <p>4) Since you are using adaptive-icon, don't try to use a background with transparency. The Image Asset UI will display it nicely but transparency is not supported in adaptive icon background</p>
  
  <p>5) Finally, to get the 2 version of icons, I added one icon in the regular process and I went to explorer to copy the mipmapXXX folders into a safe place.
  Then I added the other icon the regulare way. To finished it, I pasted the saved mipmap folders int the variante folder tree as mentionned by @W0rmH0le</p>