2
votes

I am creating an android application using ionic 3, when i attempt to upload to playstore i get an error that my app targets api 25, when i check my project.property the value of target =android-26, same with my androidManifest.xml the value of targetSdkVersion = 26, how do i set the target again. Below is my ionic info

Ionic:

ionic (Ionic CLI) : 4.4.0 (C:\Users\IETECH\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.8

Cordova:

cordova (Cordova CLI) : not installed Cordova Platforms : not available Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 8 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Program Files (x86)\Android\android-sdk) NodeJS : v8.12.0 (C:\Program Files\nodejs\node.exe) npm : 6.4.1 OS : Windows 10

3

3 Answers

1
votes

You need to install android platform 26, and then change android:targetSdkVersion="26" in the <uses-sdk> tag in platforms/android/AndroidManifest.xml file in the Ionic 3 application folder.

You should then be able to create a new release build and upload the app to Play Store successfully.

Alternatively, if you upgrade cordova to the latest version, a fresh cordova build will create the AndroidManifest.xml file with android:targetSdkVersion="26".

1
votes

Open your config.xml in the root folder of the project and adjust version accordingly in the following section:

<platform name="android">
        <preference name="android-minSdkVersion" value="25" />
...

Basically update the value to what your min bar is.

0
votes

Did you build using a specific android version? What versions have you installed to Android Studio? Maybe you built using a version provided automatically and somewhere in your config you had another version specified. Anyway cant answer with that information. When you build the app you get no errors?