Proguard和Gson-在arraylist中转换变量名


Proguard and Gson - Convert variable name inside arraylist

在调试中,我的代码运行良好。当我用proguard 5发布我的apk时,proguard会关闭我的变量,当我尝试"Jsonify"时,生成的字符串会关闭,因此,我的PHP脚本什么都不懂。

这是我的代码:

ArrayList lCapturas=。。。;

if (lCapturas != null) {
            Gson gson = new Gson();
            Type listOfCapturaObject = new TypeToken<List<Captura>>() {
            }.getType();
            json = gson.toJson(lCapturas, listOfCapturaObject);
        }

和我的Json字符串

[{"j":"2014-09-10 17:35:25","e":"2014-09-  10","f":"19.3641107,-99.1785061","d":28809,"c":85,"b":2705,"a":1,"l":1,"m":0}]

我想我必须说Proguard没有攻击Captura物体。有没有办法禁用该选项?或者我该怎么办???

我解决了问题:

-keep class com.pkg.vo.myClass { *; }

对于每个类,我需要保留变量名。

StackOverflow没有拯救我的一天:(