使用了greendao,在bean里面用了@Keep,然后将集合和json来回转换,用到了如下代码:
Gson gson = new Gson();
gson.fromJson(cacheUser.getJsonFriends(),new TypeToken<List<String>>(){}.getType());
然后Build时报错上面那条。放到别的类正常,不解,记录一下。
Pb(100) The method getType() is undefined for the type new TypeToken<List<String>>(){}
阅读 57
2022-07-12
使用了greendao,在bean里面用了@Keep,然后将集合和json来回转换,用到了如下代码:
Gson gson = new Gson();
gson.fromJson(cacheUser.getJsonFriends(),new TypeToken<List<String>>(){}.getType());
然后Build时报错上面那条。放到别的类正常,不解,记录一下。
相关推荐
精彩评论(0)