Android Build with Gradle and ProGuard : “The output jar must be specified after an input jar, or it will be empty”

前端 未结 1 1067
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-30 22:23

I\'m creating a build with different flavors with Gradle. It used to run quite good until now, until I wanted to enable Proguard. I enabled minifyEnabled<

相关标签:
1条回答
  • 2020-12-30 23:04

    It took quite a while for me to figure it out but, as I had guessed, it was all about Proguard configuration.

    I started to dig through the Warnings in the Console and realized that some of the References couldn't be found by Proguard. So adding them as -dontwarn to proguard configuration file solved the problem.

    In my case, I had to ignore packages below;

    -dontwarn java.lang.invoke**
    -dontwarn org.apache.lang.**
    -dontwarn org.apache.commons.**
    -dontwarn com.nhaarman.**
    -dontwarn se.emilsjolander.**
    
    0 讨论(0)
提交回复
热议问题