Ionic 5 to change Android minSdkVersion from 21 to version 23


I’m trying out Ionic 5 App on android Emulator.

command: ionic capacitor run android -l --external


FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [] 


Name: Pixel_2_API_27 CPU/ABI:
Google APIs Intel Atom (x86)
Target: google_apis [Google APIs] (API level 27) 
Skin: pixel_2 
SD Card: 100M


"@ionic/angular": "^5.5.2"
"@ionic-native/core": "^5.34.0",

Before on Ionic 4 we could change the config.xml

 <preference name"android-minSdkVersion" value"23" /> 

but in Ionic 5 I’m not sure how to change it.


On Capacitor you manage the minSdkVersion from gradle on:


I hope this be useful to you.

Answered By – Gabriel Sebastián López Illia

Leave a Comment