0
点赞
收藏
分享

微信扫一扫

Pb(100) The method getType() is undefined for the type new TypeToken<List<String>>(){}

中间件小哥 2022-07-12 阅读 57


使用了greendao,在bean里面用了@Keep,然后将集合和json来回转换,用到了如下代码:

Gson gson = new Gson();
gson.fromJson(cacheUser.getJsonFriends(),new TypeToken<List<String>>(){}.getType());

然后Build时报错上面那条。放到别的类正常,不解,记录一下。


举报

相关推荐

0 条评论