Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

[INSTALL_FAILED_CONFLICTING_PROVIDER] #320

Closed
kumar-gct opened this issue Nov 10, 2015 · 32 comments
Closed

[INSTALL_FAILED_CONFLICTING_PROVIDER] #320

kumar-gct opened this issue Nov 10, 2015 · 32 comments
Labels

Comments

@kumar-gct
Copy link

Hi,

I have installed this plugin in the two different apps, apps are working fine in different devices. But if we try to install the both app on the single device then it shown the below mentioned url.
Please help me to resolve this issue.

ERROR: Failed to launch application on device: ERROR: Failed to install apk to d
evice: pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 10, 2015

Is the app that you are seeing the error with already on the device? If so first uninstall and then try again.

@kumar-gct
Copy link
Author

I have two different apps and have to install the both app on the same device.
If I install only one app at a time then work perfectly but my requirement is to run both on the same device.

if I remove the app 1 then app 2 is install easily but if app 1 is exists in the device then app 2 not installed showing the error

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 10, 2015

What version of the plugin are you using? I've seen this issue before but in my case I already had the app that was causing the issue installed on the device. Uninstalling first was enough to fix for me.

Also what other plugins are you using?
Was the second app created by copying the first?

@kumar-gct
Copy link
Author

I am using plugin version 1.4.2 in cordova 5.3.3.
I have checked each scenario by removing all the plugin etc.
Today, I also have tested it to create separate new fresh app and installed the plugin in both apps. The same issue occurs if we try to install both apps in the same device.

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 10, 2015

Can you try uninstalling all old versions of any apps with the plugin from your device. And then try to install your two apps again.

@kumar-gct
Copy link
Author

Yes, I have tried. but no luck

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 10, 2015

Are you able to show me the AndroidManifest.xml files from the two projects?

@kumar-gct
Copy link
Author

@kumar-gct
Copy link
Author

Yes, Please download from the below mentioned url
https://drive.google.com/file/d/0B9yxq8hJMPKiVFM2and6QUFQdHc/view?usp=sharing

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 10, 2015

They look fine? I'm at a loss on this one I'm afraid. Are you sure that there are no other apps installed on your device that might have similar package name?

Could you try creating two new apps that have completely different package names com.mytestpackage and com.someotherpackage for example? Just to see if you can get them to install.

I can confirm that this plugin works with multiple apps. I have at least three of my apps using this plugin installed on my device. Both debug builds and installs from the play store.

The times I've seen this issue the app was already on the device (usually a debug build) so uninstalling fixed it for me.

@kumar-gct
Copy link
Author

I already have tried this, But will try again.

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 10, 2015

I also found this https://code.google.com/p/android/issues/detail?id=189079 basically they are saying that another app has declared the same provider authorities as google play services and this is causing the issue. I'm not sure if this is the case here but have you tried installing your two apps on a different device or even on the emulator?

@fredgalvao
Copy link
Collaborator

Might be worth trying to rename the classes registered as providers/listeners, if that's the case, @smdvdsn .

@kumar-gct
Copy link
Author

I have tried to install both apps in more than 4 devices. But every time same error occured

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 11, 2015

What version of play services do you have installed? Could this be your issue? https://code.google.com/p/analytics-issues/issues/detail?id=784

edit: Actually that issue is related to analytics not GCM so probably not your exact issue. I'll leave it here though as it could help you track down your problem.

@suspiration
Copy link

I too ran into this same issue. Since using this new plugin, I had to upgrade Google Play Services to a higher version. Because of a change in Google's AndroidManifest.xml (https://code.google.com/p/android/issues/detail?id=193567), it gives INSTALL_FAILED_CONFLICTING_PROVIDER error when installing multiple app on the same device.

Simple fix is to add applicationId under defaultConfig in build.gradle. Hope this helps.

@macdonst
Copy link
Member

@suspiration Thanks, that is very valuable information. I'll have to see if we can automate it.

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 12, 2015

@macdonst Perhaps this would be better in Cordova Android core project. I imagine that any plugin using play framework could have this issue.

@macdonst
Copy link
Member

@smdvdsn sorry, what do you mean? Adding play services to Android core?

@smdvdsn
Copy link
Collaborator

smdvdsn commented Nov 12, 2015

@macdonst sorry no I mean we should suggest that cordova android add the applicationId property to the default build.gradle

@kumar-gct
Copy link
Author

@suspiration Thanks for your help. I have just added applicationid in the build.gradle under defaultconfig and both app work perfectly.
eg: applicationId "com.application.name"

@laurencedorman
Copy link

I had this problem and had to roll back to phonegap-plugin-push 1.3.0 in order to solve error.

This is with cordova 5.4.0 btw

@macdonst macdonst added bug and removed retest labels Nov 18, 2015
@macdonst
Copy link
Member

Re-opening this as it really needs to get fixed either by this plugin or cordova-android.

@macdonst
Copy link
Member

I've automated this with push.gradle, as of version 1.4.4 it will add the applicationId for you so you don't see this error anymore.

@shaoner
Copy link

shaoner commented Mar 18, 2016

Hi,

@macdonst : commit 48c4a56 removes the push.gradle file used to resolve this issue.

@markono
Copy link

markono commented Apr 1, 2016

Hi,
since push.gradle file was removed, is there any new solution for INSTALL_FAILED_CONFLICTING_PROVIDER error on version 1.6.1 ?

Thanks.

@ericb
Copy link
Contributor

ericb commented Apr 1, 2016

I was experiencing this issue until I updated cordova. You can also explicitly set the applicationId as stated above.

@markono
Copy link

markono commented Apr 1, 2016

Thanks @ericb ,
latest cordova update resolves the problem.

@lavarith
Copy link

This is still a problem using the adobe online build system. It isn't clear how to resolve this.

@axemclion
Copy link

axemclion commented May 4, 2016

Looks like this is fixed in CB-10014 and a corresponding commit.

We could get do away with the commit.

This commit is causing the plugins to be unusable with react-native-cordova-plugin. The fundamental issue is that ReactNative includes plugins as libraries, while Cordova simply changes build files to make plugins a part of the main project. A library cannot have an applicationID and thus, this library can only be used when included in a main project as a result of computing applicationID in gradle.

A library cannot really set an applicationID

@darshanar
Copy link

i have added Zopim sdk in build.gradle, I m getting "Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]" ,
As above mention solution applicationID should be in gradle file, my applicationID is already in build.gradle still i m facing the issue.

@lock
Copy link

lock bot commented Jun 4, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests