Android-Studio-1.2.RC Proguard warnings on Square's Okio library reference

試著忘記壹切 提交于 2019-12-05 03:31:59

You've disable warnings for

-dontwarn com.squareup.**
-dontwarn okio.**

But what about for packages (as seen in your posted log)

-dontwarn org.codehaus
-dontwarn java.nio

Either way, ignoring warnings is not a good approach.

Try keeping these classes from being minified like so:

-keep public class org.codehaus.**
-keep public class java.nio.**
Bodhi Hu

Oh Christ, I forgot to specify the proguard file for my debug build, adding the 'proguardFiles' rule would solve the problem:

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable false
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            applicationIdSuffix ".debug"
        }
    }

One of those moments you searched hard for your keys and it's right in your pocket.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!