Invoke-customs are only supported starting with android 0 --min-api 26

iDea Brains picture iDea Brains · Apr 18, 2018 · Viewed 180.2k times · Source

before i'm use build version gradle 26 but after change buildtoolsversion to 27 like as this image error : error build gradle screenshot

Answer

Obakeng Molebatsi picture Obakeng Molebatsi · May 6, 2018

After hours of struggling, I solved it by including the following within app/build.gradle:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

https://github.com/mapbox/mapbox-gl-native/issues/11378