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

来源:互联网 发布:龙之信条身材捏脸数据 编辑:程序博客网 时间:2024/06/05 02:40

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

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

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

阅读全文
0 0
原创粉丝点击