2016-08-24 6 views
0

私のアプリでは、ネットワーク通信にレトロフィット2を使用しています。私は自分のアプリケーションを難読化するDexguard 7.2.09を使用し、すべてのネットワーク通信が1期待働いているDexGuard 7とRetrofit 2のエラー

@Multipart 
@POST(V2__ACCOUNT__UPLOAD_AVATAR) 
Call<UploadAvatarResponse> uploadAvatar(@PartMap Map<String, RequestBody> params); 

: は、私は、例えば、すべてのAPI要求が含まれているserverAPIインタフェースを持っています!

私は本当に何が間違っているのか分かりません。

アプリケーションがこのリクエストを呼び出すと、コードはonFailure()メソッドにジャンプしますが、アプリケーションは要求をサーバーに送信しません。

私がアプリケーションを難読化しなければ、すべて正常に動作しています。

答えて

0

あなたはコールバックを使用しているとして、あなたは以下を追加する必要があるかもしれません:

-keepattributes Exceptions 
+0

私は追加しましたが、私には役に立たない – just

0

プロジェクトでProGuardのを使用している場合は、あなたの設定に次の行を追加します。

# Platform calls Class.forName on types which do not exist on Android to determine platform. 
-dontnote retrofit2.Platform 
# Platform used when running on RoboVM on iOS. Will not be used at runtime. 
-dontnote retrofit2.Platform$IOS$MainThreadExecutor 
# Platform used when running on Java 8 VMs. Will not be used at runtime. 
-dontwarn retrofit2.Platform$Java8 
# Retain generic type information for use by reflection by converters and adapters. 
-keepattributes Signature 
# Retain declared checked exceptions for use by a Proxy instance. 
-keepattributes Exceptions 

ソース: http://square.github.io/retrofit/

+0

私は追加しましたが、私には役に立たない – just

関連する問題