App Not Installed Error after using VoltBuilder with Certificate

I have just recently upgraded from AppStudio to I am developing on a Windows 10 machine. I am migrating my version 6 Andoid app to version 8. I have converted all of the jQuery Mobile controls to BS4 which wa a lot of work. (For some reason Framework Converter did not work for my app).

I have create a certificate using VoltSigner and have updated my Project Preferences, in the VoltBuilder and Cordova section and put the keystore into my projects certificates folder. I am also doing a Android --debug build.

The issue is that every time I do a VoltBulder build and install it on my Android device (Samsung S6 - Adroid version 7.0) I get the follwoing Error Message: “App not installed. The package conflicts with an existing package by the same name”. This error appears after the prompt that states: “Do you wish to install an update to this exisiting application? Your exisiting data will not be lost. It does not require and special access”. I then have to uninstall the current App before I an install the new one.

Any help will be greatly appreciated,

This can happen if you change the certificate for the app - it finds the old version of the app, but since the certificate does not match, it cannot replace it. (This is a good thing, otherwise a malicious user could replace your app).

It’s important to keep using the same certificate.

I am not sure that I fully comprehend what you are explaining. I have executed the follwing steps:

  1. I fully unistalled the previous App (with an old Keystore) from my Android device.
  2. I used VoltSigner to create a new Keystore (which I call “peats.keystore”).
  3. I run VoltBuilder to make a Native App (debug build)
  4. I installed the newly built App with a newly created Keystore on my device
  5. I run the App to make sure everything is working.
  6. I run Voltbuider a second time without making any changes to the App code (using the exact same Keystore as previous.)
  7. When trying to install the App, the second time, I get the message that I outlined in my first post.

What am I missing here?
How can I tell if VoltBuilder is using my keystore and not generating it’s own each time I run a buiild? (The is nothing that I can see in the VoltBuilder log to help me determine this).

Please help,

Did you put peats.keystore in the certificates folder in your project directory?

Did you complete the Android fields in Project Properties, under VoltBuilder & Cordova?

Yes, I put the peats.keystore file into the certificates folder.
Yes, I enter the following information into the VoltBuilder & Cordova section of the Project Properties:

(I removed the passwords for this screen shot but they are entered)

Can you run another build so I can look at it? What email address are you using in VoltBuilder? (Just give the first few letters so I can find it)

I have run another build. You can find it using my suran---- email address.

After spending most a day trying to determine what is occurring, I think that I finally have it.

When creating an Android --debug build, it doesn’t seem to matter whether you use a Keystore or not. Each time you do a build, the APK file that is created will only install after you fully delete the current one that is running on the Android Device.

When creating an Android --release build, the Keystore is essential. Each time you do a build, the APK file that is created will install over the one currently running on the Android Device (as long as the Keystore file is the same one used previously).

For me… I am not able to test my App using a Desktop Browser. I need to create a Native Build and install it on an Android Device. I thought that creating a --debug build was the way to proceed but as I found out, each APK created this way will require the previous one to b e removed from the Android Device. This also means that all SQLite database changes done when running the App will be lost. Going forward, it appears that I must create –release builds if I wish to overwrite the previous build without loosing any data. (please tell me if I am wrong or if there is another way.)

I wish that this information was included somewhere in the documentation as it would have been very helpful.

Kindest Regards,

Sorry for the delay - I was duplicating your results.

I can see where it be nice if it didn’t work this way. We’ll research this further.

We’ve made a change in VoltBuilder which may fix this. Can you give it a try?

My turn to say sorry for the delay. Yes, it appears from my few quick tests that the changes that you made to VoltBuilder have resolved the issue. I am now able to make --Debug builds (using my Keystore file) which will install over the previous one without requiring me to do and uninstall first.

Much Appreciated,

Thanks for the good news - we’ll let everyone know!

(Thanks for the good suggestion!)