【发布时间】:2014-05-17 21:09:41
【问题描述】:
我发现了涉及同一主题的旧问题,但在最新版本中,没有一个可用的答案对我有用。
我在我的项目中使用 Retrofit。当我尝试组装时,出现以下错误:
警告:retrofit.client.OkClient:找不到引用的类 com.squareup.okhttp.OkHttpClient
我正在使用以下方法,但没有任何帮助:
-keepattributes Signature
-keep class retrofit.** { *; }
-keep class retrofit.http.** { *; }
-keep class retrofit.client.** { *; }
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-keep class com.google.gson.** { *; }
-keep class com.google.inject.* { *; }
-keep class org.apache.http.* { *; }
-keep class org.codehaus.mojo.** { *; }
-keep class org.apache.james.mime4j.* { *; }
-keep class javax.inject.* { *; }
-keep class sun.misc.Unsafe { *; }
-libraryjars libs/acra-4.5.0.jar
-libraryjars libs/radial-menu-v4.jar
-dontwarn javax.xml.stream.events.**
-dontwarn rx.**
-dontwarn org.apache.lang.**
# Application classes that will be serialized/deserialized over Gson
-keep class com.example.package.network.** { *; }
最近有人遇到过这个问题并解决了吗?
【问题讨论】: