user2121089 user2121089 - 3 months ago 15
Android Question

Android application with different package name but same code did not installing on one device

I am working on an android application. Meanwhile i got chance to work on another application similar to first. I have just copy my previous code to new

project.

1) src files

2) res files

3) manifest

4) build.gradle

and then I change packagename from com.abc to com.xyz in

1) build.gradle

2) Manifest

3) src files

Now i have installed first app in my device and try to install second one but it does not work.
Same error also occur when i have installed second app and try to install first one.

Here is the error

enter image description here

Is there any other thing i need to change apart from packagename??

Answer

There may be different issues, but try this: go to gradle and change applicationId, another reason could be conflicting of authorithies in apps, refer to these:

Install shows error in console: INSTALL FAILED CONFLICTING PROVIDER

INSTALL_FAILED_CONFLICTING_PROVIDER in Android

http://gradlewhy.ghost.io/overcoming-install-failed-conflicting-provider/