Android Oculus VR fails to build with No signature of method: (...) is applicable

image

I’m trying to build the oculus VR client using the above configuration. Gradle plugin is set to 3.6.4 and gradle version 7.3

Build file ‘C:\OculusVR\app\build.gradle’ line: 8

A problem occurred evaluating project ‘:app’.

No signature of method: build_5sydjdpldan2vnmbrwryc8z1h.android() is applicable for argument types: (build_5sydjdpldan2vnmbrwryc8z1h$_run_closure2) values: [build_5sydjdpldan2vnmbrwryc8z1h$_run_closure2@3370bd85]

Which points to this line in the build.gradle.

android {
    signingConfigs {
        release {
            storeFile file('./dummy.jks')
            storePassword 'nvidia'
            keyAlias 'nvidia'
            keyPassword 'nvidia'
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField "boolean", "ENABLE_DEBUG", "false"
            signingConfig signingConfigs.release
        }

        debug {
            buildConfigField "boolean", "ENABLE_DEBUG", "true"
        }
    }


    buildToolsVersion '28.0.3'
    ndkVersion '21.4.7075529'
    compileSdk 25// current LTS atm

    defaultConfig {
        applicationId "com.nvidia.cloudxr.ovr"
        minSdkVersion 25
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "arm64-v8a"
        }
    }


    lintOptions {
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_6
        targetCompatibility JavaVersion.VERSION_1_6
    }
}

Anyone know how I can solve this?

This problem disappeared when I changed to Java version 8