I do proguard for PublicSuffixDatabase, but still got java.lang.IllegalStateException: Unable to load publicsuffixes.gz resource from the classpath.
this is my proguard cfg:
#okhttp3
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
-keep class okhttp3.internal.publicsuffix.PublicSuffixDatabase
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
is there any other reason to cause this exception?
eg:
load fail?
any explanation about this exception?
java.lang.IllegalStateException: Unable to load publicsuffixes.gz resource from the classpath.
at okhttp3.internal.publicsuffix.PublicSuffixDatabase.findMatchingRule(SourceFile:119)
at okhttp3.internal.publicsuffix.PublicSuffixDatabase.getEffectiveTldPlusOne(SourceFile:82)
at okhttp3.Cookie.parse(SourceFile:311)
at okhttp3.Cookie.parse(SourceFile:219)
at okhttp3.Cookie.parseAll(SourceFile:445)
at okhttp3.internal.http.HttpHeaders.receiveHeaders(SourceFile:179)
at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(SourceFile:185)
at okhttp3.RealCall$AsyncCall.execute(SourceFile:135)
at okhttp3.internal.NamedRunnable.run(SourceFile:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:833)
Typically this means you’ve stripped OkHttp’s okhttp3/internal/publicsuffix/publicsuffixes.gz resource from your .jar file. If you can make sure that file is inside your okhttp.jar file, you’re good.
No action for us on this.
I'm having the same problem
Encountered the same problem and resolved it by rebuild project.
Encountered the same problem and resolved it by rebuild project.
thanks,I solved the problem through your method.This problem should be an AS bug
Most helpful comment
Encountered the same problem and resolved it by rebuild project.