Java – Language changes are valid until uploaded to the Google Play Store, but not after uploading to the Play Store. Why?

Language changes are valid until uploaded to the Google Play Store, but not after uploading to the Play Store. Why?… here is a solution to the problem.

Language changes are valid until uploaded to the Google Play Store, but not after uploading to the Play Store. Why?

  • There are two languages in my application.
  • If I download the app from a device whose default language is English. Then it will not change to Chinese strings.xml (zh).
  • If I change my device language to Chinese and download the app, then it works fine and changes to both languages. Probably because we have English in our default strings.xml file.

It may be because the Google Play Store does not allow users to download resource files that it deems unwanted to the user.

Can anyone help me? Thank you.

Solution

The problem is that you are publishing your app on the Play Store using a .aab file. It deletes localization files at installation time based on the user’s phone settings.

To fix this, you need to put this line in your build.gradle file and try uploading it again

android {

//... removed for brevity
  bundle {

language {
       enableSplit = false
     }
   }
}

Link to refer

Related Problems and Solutions