Proguard和接口使用默认方法

时间:2017-05-24 10:41:41

标签: android proguard

我在构建过程的proguard步骤中遇到了一些问题。

步骤因这些错误而停止:

com.google.android.gms.common.zza: can't find referenced class android.content.ServiceConnection$$CC
com.mypkg.misc.views.HintToast: can't find referenced class android.animation.Animator$AnimatorListener$$CC

看看这两个类的定义:

public interface AnimatorListener {
    default void onAnimationStart(Animator animation, boolean isReverse) {
        throw new RuntimeException("Stub!");
    }

    default void onAnimationEnd(Animator animation, boolean isReverse) {
        throw new RuntimeException("Stub!");
    }

    void onAnimationStart(Animator var1);

    void onAnimationEnd(Animator var1);

    void onAnimationCancel(Animator var1);

    void onAnimationRepeat(Animator var1);
}

public interface ServiceConnection {
    void onServiceConnected(ComponentName var1, IBinder var2);

    void onServiceDisconnected(ComponentName var1);

    default void onBindingDied(ComponentName name) {
        throw new RuntimeException("Stub!");
    }
}

似乎我的Proguard配置文件没有正确处理接口的默认方法。

0 个答案:

没有答案