Locale "ar" 语言更改不适用于华为设备,但适用于其他设备
Locale "ar" language change not working with Huawei Devices but working with others
我在清单中设置 android:supportsRtl="true"
并调用 setLocale("ar");
Locale locale = new Locale(lang);
LocaleChanger.setLocale(locale);
Intent refresh = new Intent(getContext(), MainActivity.class);
getActivity().finish();
refresh.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(refresh);
它在我的三星设备上运行良好,但在华为设备上运行不佳。它换边了 locale.default 给我 "ar" 作为语言但由于某种原因它似乎没有检测到 ar string.xml
知道为什么会发生这种情况以及可能的解决方法吗?
编辑:
我必须补充一点,在调试类型中它适用于华为设备,但不适用于发布或生产类型。
当我上传到商店时,通过将 .aab 更改为 apk 最终修复了它。
我在清单中设置 android:supportsRtl="true"
并调用 setLocale("ar");
Locale locale = new Locale(lang);
LocaleChanger.setLocale(locale);
Intent refresh = new Intent(getContext(), MainActivity.class);
getActivity().finish();
refresh.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(refresh);
它在我的三星设备上运行良好,但在华为设备上运行不佳。它换边了 locale.default 给我 "ar" 作为语言但由于某种原因它似乎没有检测到 ar string.xml
知道为什么会发生这种情况以及可能的解决方法吗?
编辑: 我必须补充一点,在调试类型中它适用于华为设备,但不适用于发布或生产类型。
当我上传到商店时,通过将 .aab 更改为 apk 最终修复了它。