我发现较旧的问题涉及同一主题,但最新版本没有可用的答案适合我.
我在我的项目中使用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 …Run Code Online (Sandbox Code Playgroud)