cancel
Showing results for 
Search instead for 
Did you mean: 

MDK: new "Customized Mobile Development Kit Client" installation fails after download

StefanoB
Explorer
0 Kudos

Hi experts

I developed an MDK Project (6.3.3 MDK Runtime).
This MDK Project is built as Customized MDK Client (6.3.3) using Cloud Build Service for Android, indicating "AppVersion" attribute as "1.0.0" in file "MDKProject.json".
Then I installed this Android app in my device scanning an on-boarding QR code and it works well.

The problem is this:
I needed to do a new build because I added some new permissions on AndroidManifest.xml.
So, I built a new Customized MDK Client (6.3.3) using Cloud Build Service for Android, changing only "AppVersion" attribute as "1.1.0" in file "MDKProject.json":

Then, I used the new on-boarding QR code for install the new Android app, still having the previous version app on my device.

After download, Android inform me with the following first popup "Do you want to update this app?".
After I press "Update", the installation fails with this following second popup "App not installed because the package conflicts with an existing package.":

We expect the installation to be successful because the app has the same "BundleID" , the same "AppName" and a later "AppVersion", replacing the old version of the app.

But for this problem, we have to tell the user to uninstall the old version of the app and only then, install the new app.


How can I fix?

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I believe Android relies on the Android Version Code to determine if the app is already installed when the bundle id is the same. By default in your MDK clients the Android Version code will be 1 unless you specify it as a specific value or set it to auto.

I would suggest you add the following in your MDKProject.json. This will generate the value based on the AppVersion. See the docs for more details on how it auto calculates the value.

"AndroidVersionCode": "Auto"
StefanoB
Explorer
0 Kudos

Hi bill.froelich

Thank you for your answer but your solution doesn't work.

I tried to add in my "MDKProject.json" file the attribute:

"AndroidVersionCode": "Auto"

or I tried to add in my "MDKProject.json" file the attribute:

"AndroidVersionCode": "2"

but the problem above described remains.

In "MDKProject.json" file I only increased "AppVersion" attribute from "1.1.0" to "1.2.0" and I add the attribute "AndroidVersionCode" as described above:

Do you have any other solution?