Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Underscore in Package name in Unity 2019.3.0a2 is not accepted?! Bug?

Discussion in 'Editor & General Support' started by Mr-Simpson, May 21, 2019.

  1. Mr-Simpson

    Mr-Simpson

    Joined:
    Apr 7, 2015
    Posts:
    10
    I wanted to make an updated version of my existing app for android in Unity 2019.3.0a2.
    My original package name had the format of www.my_company.myapp (with an underscore)
    But when I enter the package name in Unity 2019.3.0a2 it changes automatically to www.mycompany.myapp without the underscore. But I need to have my package name with underscore.

    How can I fix it? Is it a bug in Unity?

    Please help, google removed my original app and I need to re-upload the new one.
     
    IT-Keller likes this.
  2. Lexa_k6

    Lexa_k6

    Joined:
    Nov 12, 2017
    Posts:
    1
    The same issue. Someone knows how to solve?
     
    IT-Keller likes this.
  3. lachlanmcewen

    lachlanmcewen

    Joined:
    Sep 7, 2014
    Posts:
    3
    Did you find a fix for this? This seems like a very serious bug
     
    IT-Keller likes this.
  4. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    I do have to ask, why would you make a commercial release with an alpha version of the engine? Beta I can understand, but alpha? The whole point of the alpha cycle is to get rapid feedback into the development of the engine before it's stabilised.
     
    Joe-Censored likes this.
  5. YondernautsGames

    YondernautsGames

    Joined:
    Nov 24, 2014
    Posts:
    328
    This is also the case for Unity 2019.2.1f1 - not alpha or beta, but full production release. I have 15 apps I can't update since it won't let me use the package identifier they have on the store so yes this is very serious.

    I've submitted a bug through the editor, but this is a pain. I worked my way up the versions from 2018.4 (LTS) due to an error building Android packages that was affecting me and only fixed in 2019.2 and now I'm stuck with this.
     
  6. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    Ok, that's much more serious.
     
    YondernautsGames likes this.
  7. YondernautsGames

    YondernautsGames

    Joined:
    Nov 24, 2014
    Posts:
    328
    Aye. Normally I'd say sticking with a long term support version is sensible but I couldn't in this case. I'm now trying to downgrade the project again, and then I'll try and fix the original build problem that led to me upgrading, but it's costing me days of time and I'm on a deadline :(

    I'd expect this to start affecting a lot of people as more start upgrading to 2019

    Also, just to add insult to injury, it strips out underscores but allows dashes in the name which aren't even valid for Android application identifiers.
     
  8. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    I do wonder if someone typoed the regex for that.
     
  9. YondernautsGames

    YondernautsGames

    Joined:
    Nov 24, 2014
    Posts:
    328
    Possibly. Unless there's something crazy behind the scenes tied to the application id (like the package manager sharing code or something like that) it seems like it should be such a trivial thing to fix. It's a bit worrying that this was reported 3 months ago though. Not sure how to bring it to the attention of the right people with any kind of speed.
     
  10. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    What is the issue ID? Have you gotten a confirmation that it has been reproduced by QA? If not it could have been overlooked in the bug queue.
     
  11. YondernautsGames

    YondernautsGames

    Joined:
    Nov 24, 2014
    Posts:
    328
    I only submitted my bug report about an hour before I found this thread so I wouldn't expect it to be reproduced for a while. My deadline is Friday so I'm treating no fix as an absolute certainty and going back to the previous problem as that one might be fixable :p

    The 3 months I was referring to was this thread, and I'd be shocked if nobody else has been affected in that time. Using an underscore in a GP app id is pretty common.
     
    Garrettec likes this.
  12. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    Yeah, unfortunately it's quite common for people to write about an issue here and not submit a bug. I cannot find anything relevant in the issue tracker which would suggest that the person who originally found this and started this thread did not submit it. :-/
     
  13. YondernautsGames

    YondernautsGames

    Joined:
    Nov 24, 2014
    Posts:
    328
    AlkisFortuneFish likes this.
  14. NothingFace

    NothingFace

    Joined:
    Jul 27, 2017
    Posts:
    1
    I found a fix for anyone having this issue. Under Player Settings/Publish Settings, check "Custom Gradle Template". This will create a template file in Plugins/Android. Open that file in a text editor. Remove the first comment line at the top to prevent Unity from overwritting this file on your next build. Then look for the Application ID. It will have a wildcard as it's default value: applicationId '**APPLICATIONID**'. Just change this to what you want your app ID to be. Be sure to keep it between the quotes. For example: applicationId 'com.my_app.some_package_name'. This worked for me. Once the apk is created you can verify it by opening the apk in Android Studio and looking in the manifest.