Proguard 错误与解析

Proguard error with parse

当 progurad 只添加一行时,我使用 parse 1.5.1 构建没有问题。

-keep class com.parse.** { *; }

我将parse升级到1.9.4,但是parse没有用。 我参考了其他主题并添加了以下行仍然无效。 我可以忽略解析警告,但它不能解决任何问题。

-keepattributes Annotation,SourceFile,LineNumberTable
-keepattributes Signature

-keep interface com.parse.** { *; }
-keep class com.parse.** { *; }
-keep class com.squareup.** { *; }
-keep interface com.squareup.** { *; }   

我在使用 Parse 1.9.4 构建发布版本时遇到错误。

[2015-08-13 10:49:29 - wargame] Proguard returned with error code 1. See console
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find superclass or interface com.squareup.okhttp.RequestBody
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.OkHttpClient 
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.Response
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.ResponseBody
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.Request$Builder
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.Call
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find referenced class com.squareup.okhttp.RequestBody
[2015-08-13 10:49:29 - wargame] Warning: com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find referenced class okio.BufferedSink
[2015-08-13 10:49:29 - wargame]       You should check if you need to specify additional program jars.
[2015-08-13 10:49:29 - wargame] Warning: there were 72 unresolved references to classes or interfaces.
[2015-08-13 10:49:29 - wargame]          You may need to specify additional library jars (using '-libraryjars').
[2015-08-13 10:49:29 - wargame] Error: Please correct the above warnings first.

我自己遇到了这些问题,所以我向 parse 寻求帮助。他们提出了以下混淆文件:

# Keep source file names, line numbers, and Parse class/method names for easier debugging
-keepattributes SourceFile,LineNumberTable
-keepnames class com.parse.** { *; }

# Required for Parse
-keepattributes *Annotation*
-keepattributes Signature
-dontwarn com.squareup.**
-dontwarn okio.**