Search Unity

Android build using incorrect bundleId

Discussion in 'Unity Build Automation' started by smithmj5, Nov 6, 2019.

  1. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    I have an Android config set up for my project in Unity Cloud Build.

    The "Bundle Identifier" for iOS in the Unity project is: com.companyname1.gamename

    The "Package Name" for Android in the Unity project is: com.companyname2.gamename

    The above is required as I'm working with two different publishers for this game, and each wanted their company name in the identifier.

    When I do an Android build in Unity Cloud Build and check the logs, I see:

    Code (CSharp):
    1. 5275: [Unity] {"cloudBuildTargetName":"android","buildNumber":"637","scmCommitId":"xxxxxxxxx","buildStartTime":"11/6/2019 3:20:49 PM","projectId":"project-id-goes-here","bundleId":"com.companyname1.gamename","scmBranch":"branch_name_here","unityVersion":"2017.4.33f1"}
    Note that it's incorrectly using the bundle ID from the iOS settings, rather than the package name/bundle identifier that has been set for Android.

    This causes many things to break/not work, including IAP, leaderboards, and achievements because the bundle ID doesn't match what is being used in Google Play.

    Doing Android builds locally works properly, and uses the Android bundle ID com.companyname2.gamename.

    Is this a known issue with Unity Cloud Build? Is there some way I can force it to use the Android bundle ID for Android builds?

    I'm using Unity 2017.4.33f1 (both locally and in Unity Cloud Build).
     
  2. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    460
    Hey,

    I was unable to reproduce this behaviour.

    The Bundle ID should be taken from the value configured in the "Signing Credentials" settings of your Build Target.

    upload_2019-11-15_16-0-51.png

    Hope this helps!
     
    lustgunther likes this.
  3. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    Thanks @ollieblanks, somehow I completely overlooked that ID.

    Changed it, tested, and working properly.

    Cheers! :)
     
    ollieblanks likes this.