You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/16 14:06:18 UTC

[GitHub] [cordova] breautek commented on issue #229: Can't set minSdkVersion when building for Android 9.0.0

breautek commented on issue #229:
URL: https://github.com/apache/cordova/issues/229#issuecomment-659435534


   Cordova does not support API 21 (Android 5.0), so cordova-android@9 is min is set to 22, including at the framework level. This is why you're seeing a min SDK conflict, it's letting you know that another library that you are using has a higher min sdk, so that library may not work properly on anything lower.
   
   If you must support API 21, you can do so by using the `<edit-config>` tag to add what is mentioned in the error. However a little disclaimer... This puts your configuration into an unsupported state. It may work, but it may break in the future without warning and only when the app reaches attempts to execute the problematic code resulting in a hard crash. It will be up to you to test your app thoroughly on API 21.
   
   An untested example should look something like:
   
   ```
   <!-- The manifest doesn't have the tools namespace by default, so we'll need this to use tools:overrideLibrary
   <edit-config file="AndroidManifest.xml" target="/manifest[@xmlns:tools]" mode="merge">
       <manifest xmlns:tools="http://schemas.android.com/tools" />
   </edit-config>
   
   <!-- Override cordova -->
   <edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge">
       <uses-sdk android:minSdkVersion="21" tools:overrideLibrary="org.apache.cordova" />
   </edit-config>
   ```
   
   Docs for `<edit-config>` can be found at https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#edit-config
   
   Since this isn't a bug, I'll be closing this ticket. You're invited to our [slack](http://slack.cordova.io/) if you require more assistance on this.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org