Najeeb Idrees
Najeeb Idrees

Reputation: 453

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??

Upvotes: 1

Views: 5567

Answers (2)

kkost
kkost

Reputation: 3730

I have the same issue in the same case and I solved it by adding applicationId. In my case problem was in permission.MAPS_RECEIVE, I saw that in error logs. So I did next:

AndroidManifest.xml:

<permission
        android:name="${applicationId}.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

Upvotes: 1

M. Erfan Mowlaei
M. Erfan Mowlaei

Reputation: 1436

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/

Upvotes: 4

Related Questions