1. String to Date解析的正确姿势
String timeStr = "2017-04-24T06:44:28.523395";
DateFormat fm =newSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
Date date = fm.parse(timeStr).getTime();
2.检查app或libs依赖问题
./gradlew xxx-lib:dependencies
String timeStr = "2017-04-24T06:44:28.523395";
DateFormat fm =newSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
Date date = fm.parse(timeStr).getTime();
./gradlew xxx-lib:dependencies
本文标题:Android开发问题记录
本文链接:https://www.haomeiwen.com/subject/uqlpzttx.html
网友评论