I did exactly as usual to publish my ionic app on the Play store. I updated all the version numbers in my config.xml to :
<widget android-versionCode="1830" id="com.XXXX" ios-CFBundleVersion="1830"
ios-CFBundleVersionString="183" version="183"
versionCode="10" xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
I then build using ionic package build android --release --profile profile_production.
but I get an error message when I import the apk on the Play Store:
The version code must be higher ...
I tried to add this android-versionCode="18308" as mentioned here but I get the same error.
Any ideas please ?
Have you tried Semantic Versioning ?
Rather than name it 1.0.8
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.XXXX" version="1.0.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
Once you have completed make sure you do a build
ionic build android
then
cordova build --release android
Related
Debug apk works fine, release apk not working..
Tried flutter build apk --no-sound-null-safety it builds release apk but does not works.
Issue Solved!!
Actually, the problem was with 'http' as SSL certificate was not included for the admin panel hence, app showed
Bad state: Insecure HTTP is not allowed by platform error in some devices while it was running in my Mi note4 mobile phone.
Added
android:usesCleartextTraffic="true" line in
AndroidManifest.xml file inside
<manifest <application android:usesCleartextTraffic="true""> </application> </manifest> tag
The ability to mix language versions frees package maintainers to migrate their code, with the knowledge that even legacy users can get new bug fixes and other improvements. However, mixed-version programs don’t get all the advantages that null safety can bring. Read here
Solution
Code for building APK:
flutter build apk --no-sound-null-safety
I had the following error when running ionic cordova run android -l for the live reload debugging
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> android.defaultConfig.versionCode is set to 0, but it should be a positive integer.
See https://developer.android.com/studio/publish/versioning#appversioning for more information
The way to fix it was to change in the config.xml and to add a number to android-versionCode and version in the <widget> tag.
Like this
<widget
android-versionCode="1" // <-- Here
version="0.0.1" // <-- And there
id="yourId"
ios-CFBundleVersion="0"
xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
I'm using AppVersion.getVersionNumber() to get the version number of my Ionic app. But where does this number come from?
The problem is that when I run the app on a smartphone through devapp, I get a different version number depending on what OS I have…
iOS (on an iPhone 6): 1.0.2
Android (on a Samsung S10): 1.0.4
Searching around for "version" in my source code, I find this in config.xml (in the root):
<widget version="1.0.3" … >
I don't know if this is relevant, but it is the currently delivered version of the app.
I'm using Ionic 4.10.0
AppVersion cordova plugin reads the app details from the native code of the application.
So the version values that you see, are configured in the native IDE's.
Check these files in your respective platform folders..
ios/App/App.xcodeproj/project.pbxproj the key to look for in this MARKETING_VERSION
android/app/build.gradle the key to look for in this versionName
I'm trying to install my ionic app on my android phone. I tried
install my ionic app on my android phone
The app ran on my phone, but when I ran the same command to run a different app, the app was replaced on my mobile. How can I keep both? I don't intend to modify any of these apps, they are ready. I tried these commands as well:
ionic cordova build android --prod --release
and
ionic cordova run android --prod --release
I got this error message:
[ERROR] An error occurred while running cordova run android --release
(exit code 1)
By default, it will overwrite the previous version. You can keep the both app using below way:
Check the config.xml file, and change the id of the app.
<widget id="new.app.id" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
Now, it will be considered as a different app and will not replace the previous one.
I just built a simple app, and generated APK using following command:
ionic cordova build android
I downloaded this APK to my mobile, and trued to install. It was showing following error:
Failed to install app
Please help me.
My ionic version:3.9.2
Cordova:7.0.1
npm:3.10.10
Node: 6.11.0
Angular: 5.0.0
Typescript: 2.4.2
Check the config file. I think same id used for install app. Change the id for config file like below:
<widget id="com.ionic.app" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">