Error: Default interface methods are only supported starting with Android N

问题:

        java8才支持静态接口方法,Android N 要求jdk版本为1.8

解决:

        在app的gradle中添加

                android{

                ...

                compileOptions{

                sourceCompatibility JavaVersion.VERSION_1_8

                targetCompatibility JavaVersion.VERSION_1_8

                }

                ...

        }

你可能感兴趣的:(Error: Default interface methods are only supported starting with Android N)