2015-06-17 27 views
0

所以運行我的應用程序時,我得到這個錯誤:改造拋出:IllegalArgumentException,沒有註釋發現

06-17 12:56:08.547 E/AndroidRuntime(23432): Caused by: java.lang.IllegalArgumentException: XapoService.credit: No Retrofit annotation found. (parameter #1) 

我有谷歌搜索,發現它可以通過ProGuard的造成的。我添加以下行到我的ProGuard:

-keep class com.google.gson.** { *; } 
-keep class com.google.inject.** { *; } 
-keep class org.apache.http.** { *; } 
-keep class org.apache.james.mime4j.** { *; } 
-keep class javax.inject.** { *; } 
-keep class java.io.** { *; } 
-dontwarn retrofit.** 
-keep class retrofit.** { *; } 
-keepattributes Signature 
-keepattributes Exceptions 
-keepattributes *Annotation* 
-keep class com.squareup.okhttp.** { *; } 
-keep interface com.squareup.okhttp.** 
-keep interface retrofit.** { *; } 
-dontwarn rx.** 
-keepclasseswithmembers class * { 
@retrofit.http.* <methods> 
} 
    -keep class com.google.common.** { *; } 
    -keep class com.mycompany.testSDK.XapoService { ; } 

但我仍然收到錯誤在此呼籲:

import retrofit.client.Response; 
import retrofit.http.GET; 
import retrofit.http.Query; 
import java.util.List; 



public interface XapoService { 
    @GET("/credit/") 
    Response credit(@Query("appID") String appID, @Query("hash") String hash); 
} 
+0

如果您不運行proguard,您是否仍然崩潰? – leibreichb1

+0

''可能你錯過了昏迷' – njzk2

回答

0

SDK今天已經更新爲Android。解決了。

相關問題