Invoke-customs are only supported starting with Android O (–min-api 26) Android编译报错 解决 在app的build.gradle中的android节点中添加以下内容,然后Sync。 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } 如下图所示: