Title: Error while running 'ionic run android'
Tags: android;ionic-framework;ionic2;ionic-native;ionic3
Question: I have a native android application which is currently available in Play store. Now i have developed same application with new features in Ionic 3. For testing purpose, i have debug version of native app installed in my device. Now when i run ionic run android command, it gives me error as below.
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
Below is my config for both app.
Native App
package-name : com.myapp
version : 1.7
versionCode : 7
Ionic App
package-name : com.myapp
version : 2.0
versionCode : 8
Because i want to update same application, i have put package-name same for both application.
Note: I have debug version of native app installed in device, so it's not the case like i'm trying to update release version of native app with debug version of ionic app.
Another question is, can i access native application database in ionic application? If yes, then how?
Comment: What is your native application database?


Here is another answer: you can keep both by changing app Id that is like com.example.appname
at the time of submission you can restore app id to original
Comment for this answer: But it will not update my native app instead it will install new application. That's not what i want. Because later i want to move all the database data from native app to ionic app. If there will be both seperate applications then i can't access database of native app.
Comment for this answer: In config.xml of ionic app you can change package name ie. com.myapp

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:04/24/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<android><ionic-framework><ionic2><ionic-native><ionic3>', 'Title': "Error while running 'ionic run android'", 'ViewCount': 176, 'id': 43593491, 'user_AboutMe': '', 'user_AccountId': 7208314.0, 'user_DisplayName': 'Nirav Parsana', 'user_Reputation': 136.0, 'user_Views': 58.0, 'user_id': 5503240.0}}