Gle*_*des 6 obfuscation android json exception proguard
JSONArray.getString(1);其中 ["name",null] 是 json 数组,JSONArray[1] not a string只有在启用 proguard 时才会抛出异常。
我在我的 proguard 规则中遗漏了什么吗?
您是否尝试过这些方法:
/**
* Returns the value at {@code index} if it exists, coercing it if
* necessary. Returns the empty string if no such value exists.
*/
public String optString(int index)
Run Code Online (Sandbox Code Playgroud)
或者
/**
* Returns the value at {@code index} if it exists, coercing it if
* necessary. Returns {@code fallback} if no such value exists.
*/
public String optString(int index, String fallback)
Run Code Online (Sandbox Code Playgroud)
似乎没有返回null字符串
| 归档时间: |
|
| 查看次数: |
282 次 |
| 最近记录: |