收录一些自己遇到的报错信息通用解答。

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

    Module 级别的 build.gradle 中,android{} 节点里添加:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    例如:

    android {
        compileSdkVersion 29
        buildToolsVersion 29.0.2
        defaultConfig {
            applicationId com.jakting.opengapps
            minSdkVersion 23
            targetSdkVersion 29
            versionCode 20200219
            versionName 3.0
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
        kotlinOptions {
            jvmTarget = JavaVersion.VERSION_1_8.toString()
        }
    
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    
    }