Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Error when building android app: "Upload failed, your app currently targets API level 26 and must target API level 28"

  • When I’m going to upload the android build to google play store, it throws me an exception:

    “Upload failed
    Your app currently targets API level 26 and must target at least API level 28 to ensure it is built on the latest APIs optimized for security and performance. Change your app’s target API level to at least 28.”

    Even when I have installed cordova-android 8.1.0, and I have specify the API level on my config.xml file.

    Here is my config.xml file:

    <?xml version='1.0' encoding='utf-8'?>
    <widget id="..." version="1.0.0" xmlns="">
        <description />
        <author value="..." />
        <access origin="*" />
        <content src="index.html" />
        <preference name="loglevel" value="DEBUG" />
        <preference name="AndroidLaunchMode" value="singleTop" />
        <preference name="BackgroundColor" value="0xffffffff" />
        <preference name="DisallowOverscroll" value="true" />
        <preference name="ErrorUrl" value="" />
        <preference name="Fullscreen" value="false" />
        <preference name="KeepRunning" value="true" />
        <preference name="monaca:WebViewEngine" value="default" />
        <preference name="SplashScreen" value="screen" />
        <preference name="SplashScreenDelay" value="1000" />
        <preference name="Orientation" value="default" />
        <preference name="monaca:DisableCookie" value="false" />
        <preference name="monaca:AndroidIsPackageNameSeparate" value="false" />
        <preference name="AllowInlineMediaPlayback" value="false" />
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="BackupWebStorage" value="cloud" />
        <preference name="EnableViewportScale" value="false" />
        <preference name="FadeSplashScreen" value="true" />
        <preference name="FadeSplashScreenDuration" value="250" />
        <preference name="KeyboardDisplayRequiresUserAction" value="true" />
        <preference name="MediaPlaybackRequiresUserAction" value="false" />
        <preference name="ShowSplashScreenSpinner" value="false" />
        <preference name="SuppressesIncrementalRendering" value="false" />
        <preference name="TopActivityIndicator" value="gray" />
        <preference name="GapBetweenPages" value="0" />
        <preference name="PageLength" value="0" />
        <preference name="PaginationBreakingMode" value="page" />
        <preference name="PaginationMode" value="unpaginated" />
        <preference name="ios-XCBuildConfiguration-TARGETED_DEVICE_FAMILY" value="1,2" />
        <feature name="App">
            <param name="android-package" value="org.apache.cordova.App" />
        <feature name="LocalStorage">
            <param name="ios-package" value="CDVLocalStorage" />
        <icon src="res/app_icon.png" />
        <platform name="android">
            <preference name="android-targetSdkVersion" value="28" />
        <plugin name="cordova-custom-config" spec="^5.0.2" />
        <plugin name="cordova-plugin-splashscreen" spec="^5.0.1" />
        <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
        <plugin name="monaca-plugin-monaca-core" spec="^3.2.1" />
        <plugin name="cordova-plugin-inappbrowser" spec="^3.1.0" />
    Any help will be appreciated, thanks!

  • In the end I fixed it by going to the cordova pluging configuration section and updating there the cordova version to 9.0.0: