title: uses-sdk:minSdkVersion 1 cannot be smaller than version 19 declared in library
body: <p>I have imported the Ionic 4 Android project into Android studio. But it shows below error. I can build the app using CLI: <code>ionic cordova build android --prod</code> and no issues. Any clue?</p>
  
  <blockquote>
    <p>ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be
    smaller than version 19 declared in library
    [<strong>tested_artifact</strong>::CordovaLib]
    D:\Clients\ionic4\platforms\android\CordovaLib\build\intermediates\library_manifest\debug\AndroidManifest.xml
    as the library might be using APIs not available in 1     Suggestion: use
    a compatible library with a minSdk of at most 1,      or increase this
    project's minSdk version to at least 19,      or use
    tools:overrideLibrary="org.apache.cordova" to force usage (may lead to
    runtime failures)</p>
  </blockquote>
  
  <p>2nd error</p>
  
  <pre><code>    The minSdk version should not be declared in the android manifest file. You 
  can move the version from the manifest to the defaultConfig in the build.gradle 
  file. &lt;a href="remove.sdk.from.manifest"&gt;Move minSdkVersion to build files and 
  sync project&lt;/a&gt; Affected Modules: &lt;a 
  href="openFile:D:/Clients/ionic4/platforms/android/CordovaLib/AndroidManifest.xml"
  &gt;CordovaLib&lt;/a&gt;, &lt;a 
  href="openFile:D:/Clients/ionic4/platforms/android/app/src/main/AndroidManifest.xm
  l"&gt;app&lt;/a&gt;
  </code></pre>
  
  <p><em>config.xml</em></p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="com.my.xos" version="0.2.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;name&gt;xos&lt;/name&gt;
      &lt;description&gt;xos App&lt;/description&gt;
      &lt;author email="hi@ionicframework" href="http://ionicframework.com/"&gt;m-hospitality&lt;/author&gt;
      &lt;content src="index.html" /&gt;
      &lt;access origin="*" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;preference name="ScrollEnabled" value="false" /&gt;
      &lt;preference name="android-minSdkVersion" value="19" /&gt;
      &lt;preference name="BackupWebStorage" value="none" /&gt;
      &lt;preference name="SplashMaintainAspectRatio" value="true" /&gt;
      &lt;preference name="FadeSplashScreenDuration" value="300" /&gt;
      &lt;preference name="SplashShowOnlyFirstTime" value="false" /&gt;
      &lt;preference name="SplashScreen" value="screen" /&gt;
      &lt;preference name="SplashScreenDelay" value="3000" /&gt;
      &lt;preference name="Hostname" value="localhost:8100" /&gt;
      &lt;allow-navigation href="http://localhost:8100/*" /&gt;
      &lt;platform name="android"&gt;
          &lt;allow-intent href="market:*" /&gt;
          &lt;icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /&gt;
          &lt;icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /&gt;
          &lt;icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" /&gt;
          &lt;icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" /&gt;
          &lt;icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /&gt;
          &lt;icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /&gt;
          &lt;splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" /&gt;
          &lt;splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" /&gt;
          &lt;splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" /&gt;
          &lt;splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" /&gt;
          &lt;splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" /&gt;
          &lt;splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" /&gt;
          &lt;splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" /&gt;
          &lt;splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" /&gt;
          &lt;splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" /&gt;
          &lt;splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" /&gt;
          &lt;splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" /&gt;
          &lt;splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" /&gt;
      &lt;/platform&gt;
      &lt;platform name="ios"&gt;
          &lt;allow-intent href="itms:*" /&gt;
          &lt;allow-intent href="itms-apps:*" /&gt;
          &lt;icon height="57" src="resources/ios/icon/icon.png" width="57" /&gt;
          &lt;icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /&gt;
          &lt;icon height="40" src="resources/ios/icon/icon-40.png" width="40" /&gt;
          &lt;icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /&gt;
          &lt;icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /&gt;
          &lt;icon height="50" src="resources/ios/icon/icon-50.png" width="50" /&gt;
          &lt;icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /&gt;
          &lt;icon height="60" src="resources/ios/icon/icon-60.png" width="60" /&gt;
          &lt;icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /&gt;
          &lt;icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /&gt;
          &lt;icon height="72" src="resources/ios/icon/icon-72.png" width="72" /&gt;
          &lt;icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /&gt;
          &lt;icon height="76" src="resources/ios/icon/icon-76.png" width="76" /&gt;
          &lt;icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /&gt;
          &lt;icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /&gt;
          &lt;icon height="29" src="resources/ios/icon/icon-small.png" width="29" /&gt;
          &lt;icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" /&gt;
          &lt;icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" /&gt;
          &lt;icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /&gt;
          &lt;splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" /&gt;
          &lt;splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" /&gt;
          &lt;splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" /&gt;
          &lt;splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" /&gt;
          &lt;splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" /&gt;
          &lt;splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" /&gt;
          &lt;splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /&gt;
          &lt;splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" /&gt;
          &lt;splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" /&gt;
          &lt;splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /&gt;
          &lt;splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" /&gt;
          &lt;splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /&gt;
          &lt;splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /&gt;
      &lt;/platform&gt;
      &lt;edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription"&gt;
          &lt;string&gt;We use your location for full functionality of certain app features.&lt;/string&gt;
      &lt;/edit-config&gt;
      &lt;plugin name="cordova-plugin-whitelist" spec="^1.3.3" /&gt;
      &lt;plugin name="cordova-plugin-statusbar" spec="^2.4.2" /&gt;
      &lt;plugin name="cordova-plugin-device" spec="^2.0.2" /&gt;
      &lt;plugin name="cordova-plugin-splashscreen" spec="^5.0.2" /&gt;
      &lt;plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" /&gt;
      &lt;plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" /&gt;
      &lt;plugin name="cordova-plugin-ionic-webview" spec="^4.1.1"&gt;
          &lt;variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" /&gt;
      &lt;/plugin&gt;
      &lt;plugin name="cordova-plugin-wkwebview-ionic-xhr" spec="^2.1.1" /&gt;
      &lt;plugin name="cordova-plugin-network-information" spec="^2.0.1" /&gt;
      &lt;plugin name="cordova-plugin-advanced-http" spec="^2.1.1"&gt;
          &lt;variable name="OKHTTP_VERSION" value="3.10.0" /&gt;
      &lt;/plugin&gt;
      &lt;plugin name="cordova-plugin-geolocation" spec="^4.0.1" /&gt;
      &lt;plugin name="cordova-sqlite-storage" spec="^3.2.1" /&gt;
      &lt;plugin name="cordova-plugin-screen-orientation" spec="^3.0.1" /&gt;
      &lt;plugin name="cordova-plugin-vibration" spec="^3.1.0" /&gt;
      &lt;plugin name="cordova-plugin-android-permissions" spec="^1.0.0" /&gt;
      &lt;plugin name="cordova-plugin-androidx" spec="^1.0.2" /&gt;
      &lt;plugin name="cordova-plugin-androidx-adapter" spec="^1.1.0" /&gt;
      &lt;plugin name="cordova-plugin-file" spec="^6.0.2" /&gt;
      &lt;plugin name="cordova-plugin-file-transfer" spec="^1.7.1" /&gt;
      &lt;plugin name="cordova-plugin-document-viewer" spec="^0.9.11" /&gt;
      &lt;plugin name="cordova-plugin-file-opener2" spec="^2.2.1"&gt;
          &lt;variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" /&gt;
      &lt;/plugin&gt;
      &lt;engine name="browser" spec="5.0.4" /&gt;
      &lt;engine name="ios" spec="5.0.1" /&gt;
      &lt;engine name="android" spec="8.0.0" /&gt;
  &lt;/widget&gt;
  </code></pre>