question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proguard with okio

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:6
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

106reactions
moallemicommented, Jun 7, 2014

thanks. this solved my problem:

-dontwarn okio.**
13reactions
yangxuqiang9commented, Feb 9, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Okio ProGuard rules
ProGuard rules for Okio. All unused classes and class members removed in the optimization phase. ProGuard obfuscates the remaining classes, fields, and methods ......
Read more >
Okio 2.1.0 / Proguard issue · Issue #516 · square/okio - GitHub
Took me a while to figure out what was the cause as the issue does not occurs on my CI but updating Okio...
Read more >
Okio warning while implementing Proguard rules
Okio warning while implementing Proguard rules ... Already implemented below given solution but none of them are working still facing below listed ...
Read more >
R8 proguard - OkHttp
Square's meticulous HTTP client for the JVM, Android, and GraalVM.
Read more >
blallo/Signal-Android - proguard-square-okio.pro at ... - Unit Git
Signal-Android/proguard-square-okio.pro. 5 lines. 149 B. Raw Blame History. # Okio. -keep class sun.misc.Unsafe { *; }. -dontwarn java.nio.file.*.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found