Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proguard with okio #60

Closed
moallemi opened this issue Jun 7, 2014 · 12 comments
Closed

Proguard with okio #60

moallemi opened this issue Jun 7, 2014 · 12 comments

Comments

@moallemi
Copy link

moallemi commented Jun 7, 2014

Hi,
when I come to proguard my project this error occurs:

Warning: okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

how can I solve the problem?

@JakeWharton
Copy link
Collaborator

You can safely ignore the warnings. They aren't used when not available.

@moallemi
Copy link
Author

moallemi commented Jun 7, 2014

thanks.
this solved my problem:

-dontwarn okio.**

@AbimbolaE
Copy link

Hey @moallemi ,
How are you able to tell when a class isn't used when not available....Did you did through the entire source code???

@NickRipley
Copy link

Is there anyway this could be fixed so we don't have to use -dontwarn?

@JakeWharton
Copy link
Collaborator

No. The problem is in the Android platform's lack of these types, not this library.

@h4h13
Copy link

h4h13 commented Oct 12, 2016

@moallemi Thanks

@Mingyueyixi
Copy link

Mingyueyixi commented Nov 30, 2016

So good!-dontwarn xxx** can ignore “can't find referenced class com.xxx.xxx””warnings. But warnings arenot err,why it can't continte?
I am also "醉了"。And 围观android‘s ’"洪荒大牛"——JakeWharton.

@uncleyang9
Copy link

如果你使用是okhttp和rxAndroid,retrofit2。并且在打release包是报找不到okio,rx,retrofit。你只需要在app下的proguard-rules.pro混淆文件中加入
-dontwarn org.codehaus.**
-dontwarn java.nio.**
-dontwarn java.lang.invoke.**
-dontwarn rx.**
即可

@lixinxinlove
Copy link

-dontwarn okhttp3.**
-dontwarn okio.**

@AnshayM
Copy link

AnshayM commented Sep 20, 2017

thanks for ur suggestions,my problem is solved。

@xiangdengbin
Copy link

-dontwarn org.codehaus.**
-dontwarn okio.**

Thanks!

eigenein added a commit to eigenein/miary-android that referenced this issue Jan 8, 2019
@Daller9999
Copy link

thank you moallemi
Your variant resolved my problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests