Language change is working before uploading to Google Play Store but not after uploading to play store . Why?

后端 未结 2 1085
醉酒成梦
醉酒成梦 2021-02-18 15:47
  • In My Application There are two language.
  • If I download application from device which has English as default language.Then it is not changing to Chinese strings.x
相关标签:
2条回答
  • 2021-02-18 16:12

    As @Vrushi Patel said, this is related to Android App Bundles. To fix this you have to edit the android.bundle block in your base module’s build.gradle as shown below as mentioned in the official documentation:

    android {
    // When building Android App Bundles, the splits block is ignored.
    splits {...}
    
    // Instead, use the bundle block to control which types of configuration APKs
    // you want your app bundle to support.
    bundle {
        language {
            // Specifies that the app bundle should not support
            // configuration APKs for language resources. These
            // resources are instead packaged with each base and
            // dynamic feature APK.
            enableSplit = false
        }
        density {
            // This property is set to true by default.
            enableSplit = true
        }
        abi {
            // This property is set to true by default.
            enableSplit = true
        }
    }
    }
    
    0 讨论(0)
  • 2021-02-18 16:21

    The problem is that you're using .aab file to publish app on play store . Which removes localization files based on the user's phone settings when it's been installing .

    To solve that you need to put this lines in your build.gradle file and try uploading again

    android {
    
      //... removed for brevity
      bundle {
    
         language {
           enableSplit = false
         }
       }
    }
    

    Link to refer

    0 讨论(0)
提交回复
热议问题