Error: Invoke-customs are only supported starting with Android O (--min-api 26)

查资料意思是没有配置支持Java8:需要添加Java8的支持:

 compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

关键是:添加的有Java1.8的支持,各种clean无法解决;突然想到第一个Warning:
Error: Invoke-customs are only supported starting with Android O (--min-api 26)Waning:

One of the plugins you are using supports Java 8 language features. 
To try the support built into the Android plugin, remove the following from your build.gradle:

Error: Invoke-customs are only supported starting with Android O (--min-api 26)
上篇日志记得是AS3.0以上支持Lamada表达式了,去掉:
Error: Invoke-customs are only supported starting with Android O (--min-api 26)sync同步下:你会发现这个Error解决了啊。