hanzhanfei 2019-01-25 17:53 采纳率: 0%
浏览 1114
已结题

格式化日期在8.0手机报java.lang.AssertionError

格式化日期在8.0手机报java.lang.AssertionError

#648 Thread-20

java.lang.AssertionError

No NameTypeIndex match for SHORT_STANDARD
1 android.icu.impl.TimeZoneNamesImpl$ZNames.getNameTypeIndex(TimeZoneNamesImpl.java:724)
2 android.icu.impl.TimeZoneNamesImpl$ZNames.getName(TimeZoneNamesImpl.java:790)
3 android.icu.impl.TimeZoneNamesImpl.getTimeZoneDisplayName(TimeZoneNamesImpl.java:183)
4 android.icu.text.TimeZoneNames.getDisplayName(TimeZoneNames.java:261)
5 java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1296)
6 java.text.SimpleDateFormat.format(SimpleDateFormat.java:1004)
7 java.text.SimpleDateFormat.format(SimpleDateFormat.java:974)
8 java.text.DateFormat.format(DateFormat.java:341)
9 com.platform.APIClient.authenticateRequest(Unknown Source:72)
10 com.platform.APIClient.sendHttpRequest(Unknown Source:115)
11 com.platform.APIClient.sendRequest(Unknown Source:1)
12 com.platform.UserMetricsManager.makeUserMetricsRequest(Unknown Source:101)
13 com.etzwallet.presenter.activities.util.ApplicationLifecycleObserver$1.run(Unknown Source:22)
14 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
15 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
16 com.etzwallet.tools.threads.executor.PriorityThreadFactory$1.run(Unknown Source:11)
17 java.lang.Thread.run(Thread.java:764)1 android.icu.impl.TimeZoneNamesImpl$ZNames.getNameTypeIndex(TimeZoneNamesImpl.java:724)
2 android.icu.impl.TimeZoneNamesImpl$ZNames.getName(TimeZoneNamesImpl.java:790)
3 android.icu.impl.TimeZoneNamesImpl.getTimeZoneDisplayName(TimeZoneNamesImpl.java:183)
4 android.icu.text.TimeZoneNames.getDisplayName(TimeZoneNames.java:261)
5 java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1296)
6 java.text.SimpleDateFormat.format(SimpleDateFormat.java:1004)
7 java.text.SimpleDateFormat.format(SimpleDateFormat.java:974)
8 java.text.DateFormat.format(DateFormat.java:341)
9 com.platform.APIClient.authenticateRequest(Unknown Source:72)
10 com.platform.APIClient.sendHttpRequest(Unknown Source:115)
11 com.platform.APIClient.sendRequest(Unknown Source:1)
12 com.platform.UserMetricsManager.makeUserMetricsRequest(Unknown Source:101)
13 com.etzwallet.presenter.activities.util.ApplicationLifecycleObserver$1.run(Unknown Source:22)
14 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
15 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
16 com.etzwallet.tools.threads.executor.PriorityThreadFactory$1.run(Unknown Source:11)
17 java.lang.Thread.run(Thread.java:764)

下面是代码,
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));
String httpDate = DATE_FORMAT.format(new Date());
根据 输出的提示就找到这些代码,并且报错的全部是8.0手机,并不是每台手机都报错,

  • 写回答

1条回答 默认 最新

  • devmiao 2019-01-25 23:55
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘