【发布时间】:2016-06-05 18:14:38
【问题描述】:
我的班级是:
private static class CameraSize {
public CameraSize(int h, int w) {
this.h = h;
this.w = w;
}
public int h;
public int w;
}
List<CameraSize> lstCS=new LinkedList<>();
Gson gson = new GsonBuilder().create();
for (int l = 0; l < listSize.size(); l++) {
int height = listSize.get(l).height;
int width = listSize.get(l).width;
CameraSize cs = new CameraSize(height, width);
lstCS.add(cs);
}
gson.toJson(lstCS);
调试输出:
[{"h":1944,"w":2592},{"h":1458,"w":2592}]
发布中的输出:
[{"a":1944,"b":2592},{"a":1458,"b":2592}]
为什么??
【问题讨论】:
-
你在用proguard吗?
-
是的。我使用了 proguard 和 minifyEnablaed 。
标签: java android debugging release gson