Different Unity games cannot install on same Android device
I'm experiencing a strange issue where it appears that Android applications with different package names are being considered by the Android device as the same game. I have several applications that install perfectly fine on their own, but as soon as one of the other applications is installed, the rest fail to install. I was wondering if anyone could help me find a solution to this problem, since everywhere I have looked appears to have a similar problem, but the solutions do not work.
If I try to install one of the applications via the PlayStore and I have none of the other applications installed, the game installs perfectly. However, if I have any of the other applications installed, I get the error message:
Can't install app "App Name" can't be installed. Try again, and if the problem continues, get help troubleshooting. (Error code: -505)
On further investigation, I get the following error message when I try to Build & Run in Unity with another application already installed on the device:
UnityException: Unable to install APK! Installation failed. See the Console for details. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, UnityEditor.Android.CommandInvokationFailure ex) UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuildPointToConsole (System.String title, System.String message) UnityEditor.Android.PostProcessor.Tasks.PublishPackage.UploadAPK (Boolean retryUpload) UnityEditor.Android.PostProcessor.Tasks.PublishPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessAndroidPlayer.Launch (BuildTarget target, System.String installPath) UnityEditor.Android.AndroidBuildPostprocessor.LaunchPlayer (BuildLaunchPlayerArgs args) UnityEditor.PostprocessBuildPlayer.Launch (BuildTargetGroup targetGroup, BuildTarget target, System.String path, System.String productName, BuildOptions options) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:150) UnityEditor.HostView:OnGUI()
My theory is that the applications are somehow thought of as different versions of the same apk, and will refuse to install if any of the conflicting apks are present. I've checked the package names and keystores, however, and all of them are different. I've tried changing the package names, version numbers, bundle version codes, and the keystores, and nothing has worked so far. I also tried switching Install Location to automatic for all the conflicting apps, but that doesn't appear to be working either.
If anyone has any ideas of things I could investigate to resolve this, please let me know.
Answer by Svpam111 · Aug 31, 2017 at 06:27 AM
In my case, the problem is because I use the same facebook app Id for all games. This makes provider tags in AndroidManifest.xml of these game are the same. However, all providers are registered with the system and they need to be unique or the second app that wants to use the same name can't be installed. You could check here https://stackoverflow.com/questions/13536478/why-in-the-android-developer-guide-the-androidauthorities-is-defined-like-this
Answer by Kailric · Feb 05, 2018 at 08:33 PM
Yes, this fixed my issue. I had simply copied my project and started creating a new one for a different publisher. We where not going to use Facebook initially but I left my old code in place for when we did. Which still linked to the original Facebook game. I simply changed the app id to my tester app id and the two games could now be installed together.
Answer by The_Oathman · Nov 07, 2019 at 09:47 PM
Two APK's can not share the same android:authorities=" " in one device. only will not be installed
Answer by dlolg · Jul 23, 2019 at 09:50 AM
I have the same problem, but I think the problem is with admob. Any idea?,I have the same problem but i think is with admob. Any idea to do?
Answer by habibieamrullah · Jun 30, 2021 at 10:16 PM
This is annoying problem I got this problem too... I have two different apps that only one of them can be installed. It says it's conflicting but I checked again both apps has different package and name, and I don't even use facebook app id at all.
Your answer
Follow this Question
Related Questions
"No Android Device Found" on Build and Run 1 Answer
Decrease the pakage size of android game 1 Answer
I have a few questions 1 Answer
Unable to merge android manifest Android? 0 Answers
I am having trouble building the project for android 0 Answers