title: App icon: Why do I get "Icon has incorrect size" warning from Lint?
body: <p>When I run <em>Inspect Code</em> in AndroidStudio, I get 5x the warning &quot;Icon has incorrect size&quot;
  The warnings point to my <code>ic_launcher_foreground.png</code> files in 5 different resolutions.</p>
  <pre><code>../drawable-mdpi/ic_launcher_foreground.png:    108x108 px
  ../drawable-hdpi/ic_launcher_foreground.png:    162x162 px
  ../drawable-xhdpi/ic_launcher_foreground.png:   216x216 px
  ../drawable-xxhdpi/ic_launcher_foreground.png:  324x324 px
  ../drawable-xxxhdpi/ic_launcher_foreground.png: 432x432 px
  </code></pre>
  <p>... just like specified here:
  <a href="https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive" rel="nofollow noreferrer">https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive</a></p>
  <blockquote>
  <p>In Android 7.1 (API level 25) and earlier, launcher icons were sized at 48 x 48 dp. You must now size your icon layers using the following guidelines:</p>
  <ul>
  <li><p>Both layers must be sized at 108 x 108 dp.</p>
  </li>
  <li><p>The inner 72 x 72 dp of the icon appears within the masked viewport.</p>
  </li>
  <li><p>The system reserves the outer 18 dp on each of the 4 sides to create interesting visual effects, such as parallax or pulsing.</p>
  </li>
  </ul>
  </blockquote>
  <p>On top of that, I supply the old-style icon, also in correct size:</p>
  <pre><code>../midmap-mdpi/ic_launcher.png:    48x48 px
  ../midmap-hdpi/ic_launcher.png:    72x72 px
  ../midmap-xhdpi/ic_launcher.png:   96x96 px
  ../midmap-xxhdpi/ic_launcher.png:  144x144 px
  ../midmap-xxxhdpi/ic_launcher.png: 192x192 px
  ../midmap-v26/ic_launcher.xml
  </code></pre>
  <p>In <code>midmap-v26/ic_launcher.xml</code> I specify the use of the <code>ic_launcher_foreground.png</code> <em>only for Android 8+</em>... and that's the only place it's referenced.</p>
  <p>The warnings' details indicate that the new icon is supposed to have the old/smaller size. For example for <strong>mdpi</strong>:</p>
  <blockquote>
  <p>Incorrect icon size for 'drawable-mdpi/ic_launcher_foreground.png': expected 48x48, but was 108x108</p>
  </blockquote>
  <p>I don't see what I do wrong here. When I load the app onto different phones, the icon looks good, so maybe this is a false positive. However, I don't want to suppress the warning as it might help with future changes.</p>
  <p>From my build.gradle, if interesting:</p>
  <pre><code>compileSdkVersion 28
  buildToolsVersion '28.0.3'
  defaultConfig {
      minSdkVersion 21
      targetSdkVersion 28
  }
  </code></pre>