Program type already present: com.unity3d.player.BuildConfig
Asked Answered
D

5

5

I'm trying to integrate a Unity project into an already existing Android Studio project. I get this error when I try to run the application:

Program type already present: com.unity3d.player.BuildConfig

Disagreement answered 4/4, 2018 at 11:22 Comment(0)
B
8

I had this issue when I had Unity Monetization 3.0.1 (for ads) imported along with the "Build in extension enabled" please refer to the pic.

To resolve the issue -I disabled the "built-in Ads extension" - delete the android and ios folders in the plugin folder and - reimport the monetization package to make it work.

There is a conflict between the built in package and the one we download from the asset store. Hope this helps someone.

Disable the built-in extension if you are using Monetization package from asset store

Beanstalk answered 13/2, 2019 at 3:45 Comment(0)
I
2

I had a similar issue. My project had a library module which had the same package name as the app module. This was creating the conflict. After I change the library name in the AndroidManifest, it compiled.

Ian answered 11/5, 2018 at 9:52 Comment(0)
B
1

Check if you have imported two modules with same package name

Bedspring answered 17/4, 2018 at 8:8 Comment(0)
P
0

usually it can happen if you have libraries that use different versions of a gradle dependency.

Philia answered 15/4, 2018 at 2:54 Comment(0)
A
0

I had the same issue. I solve the issue by removing unity ads package from package manager.

edit: In my case monetization plugin and package manager's Unity Ads extension was conflicting. hope it helps

Abbottson answered 12/5, 2019 at 18:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.