将com.android.tools.build:gradle:3.4.3更新为com.android.tools.build:gradle:4.1.3
并在 gradle-wrapper.properties 中,将gradle-6.3-all.zip 转换为gradle-6.5.1-all.zip
icu4j 开始出现错误(检查版本 com.ibm.icu:icu4j:57.2 和 com.ibm.icu:icu4j:66.1)
en_EN.res 不在路径 com/ibm/icu/impl/data/icudt57b/ 中,但它在 en、en_US 或任何其他包中给出相同的错误。
使用的代码错误:
Locale locale = new Locale("en", "en");
DecimalFormatSymbols.getInstance(locale);
2021-10-15 14:26:25.506 2450-2450/com.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example, PID: 2450
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.HomeActivity}: java.util.MissingResourceException: Could not find the bundle com/ibm/icu/impl/data/icudt57b/en_EN
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3782)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3961)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2386)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)