Tio
Tio

Reputation: 73

How can I install my ionic app on my android phone?

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)

Upvotes: 0

Views: 121

Answers (1)

Setu Kumar Basak
Setu Kumar Basak

Reputation: 12022

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.

Upvotes: 1

Related Questions