Android 改装illegalargumentexception,未找到批注

Android 改装illegalargumentexception,未找到批注,android,retrofit,android-proguard,Android,Retrofit,Android Proguard,因此,在运行我的应用程序时,我遇到以下错误: 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.g

因此,在运行我的应用程序时,我遇到以下错误:

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 { ; }

Android的SDK今天更新了。已解决。

如果您不运行proguard,是否仍会发生崩溃?可能是您在
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);
}