Search Unity

Bug Localization Tables Not Loading When Using APKs

Discussion in 'Editor & General Support' started by soulcryy, Aug 19, 2022.

  1. soulcryy

    soulcryy

    Joined:
    Sep 15, 2020
    Posts:
    9
    I do have a strange bug in my project. Localization files are not loading on Development Build APKs. Under other circumstances they work without a problem.

    App Bundle Build -> Working without a problem.


    APK Build Settings
    * Development Build
    * Script Debugging
    * Wait For Managed Debugger (tried both on/off)


    Results:
    * APK installed to Android Studio Emulator / BlueStacks -> Localization not initializing
    * APK installed to Physical Device (copy and paste to device then manually install) -> Localization not initializing
    * APK build on Physical Device using "Build and Run" -> Localization WORKS (and this is the interesting part for me)

    In the end, it appears to be a problem with the addressables.

    Version List:
    * Unity Editor -> 2021.3.4f1
    * Localization -> 1.3.2
    * Addressables -> 1.19.19
    * Emulator API Level -> API 30
    * Physical Device -> Samsung S10+ on API31


    Full logcat attached.


    I don't think it's related but I was trying to implement Firebase Auth in this version (which is still not functional).
     

    Attached Files:

    Last edited: Aug 19, 2022
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
  3. Ruslank100

    Ruslank100

    Joined:
    Apr 11, 2018
    Posts:
    46
    I always encounter that behaviour (localization stops working and more) when I build the game but forget to build addressables. Try to build them (I think the path is Window/Asset management/Addressables/Groups, then select "Build" on top of the window that appears) and see if it works now
     
    karl_jones likes this.
  4. soulcryy

    soulcryy

    Joined:
    Sep 15, 2020
    Posts:
    9
    Sorry for the late replies.

    @karl_jones
    I submitted the bug report on that day. "CASE IN-14338"

    @Ruslank100
    Thank you for the hint. As I no longer need an APK it's not required at the moment. I will test this as soon as I need an APK but are you sure this will solve it? Because as I said, addressables building under normal circumstances, just not for apk builds.
     
    karl_jones likes this.
  5. Ruslank100

    Ruslank100

    Joined:
    Apr 11, 2018
    Posts:
    46
    I think so, I got exactly the same errors in logs ("selected locale is null", "No locale could be selected. Did you build the Addressables?", and more). In the worst case, localization won't work anyway...