Error when building my android game

When I tried to build my mobile game in android studio I got this error:

Could not get unknown property ‘cdvReleaseSigningPropertiesFile’ for object of type com.android.build.gradle.LibraryExtension.

It says it’s an error in the CordovaLib Gradle. Here is the codes in the build.gradle:

ext {
    apply from: 'cordova.gradle'
    cdvCompileSdkVersion = privateHelpers.getProjectTarget()
    cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
}

buildscript {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
    }
}

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

group = 'org.apache.cordova'
version = '7.1.4'

android {
    signingConfigs {
        release {
            storeFile file("XXX.keystore")
            storePassword 'XXX'
            keyAlias 'XXX'
            keyPassword 'XXX'
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
    addSigningProps(cdvReleaseSigningPropertiesFile, signingConfigs.release)
}
if (cdvDebugSigningPropertiesFile) {
    addSigningProps(cdvDebugSigningPropertiesFile, signingConfigs.debug)


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
    }

    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
    }
}

install {
    repositories.mavenInstaller {
        pom {
            project {
                packaging 'aar'
                name 'Cordova'
                url 'https://cordova.apache.org'
                licenses {
                    license {
                        name 'The Apache Software License, Version 2.0'
                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                    }
                }
                developers {
                    developer {
                        id 'stevengill'
                        name 'Steve Gill'
                    }
                }
                scm {
                    connection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git'
                    developerConnection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git'
                    url 'https://git-wip-us.apache.org/repos/asf?p=cordova-android'

                }
            }
        }
    }
}

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'
}

artifacts {
    archives sourcesJar
}

bintray {
    user = System.getenv('BINTRAY_USER')
    key = System.getenv('BINTRAY_KEY')
    configurations = ['archives']
    pkg {
        repo = 'maven'
        name = 'cordova-android'
        userOrg = 'cordova'
        licenses = ['Apache-2.0']
        vcsUrl = 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git'
        websiteUrl = 'https://cordova.apache.org'
        issueTrackerUrl = 'https://issues.apache.org/jira/browse/CB'
        publicDownloadNumbers = true
        licenses = ['Apache-2.0']
        labels = ['android', 'cordova', 'phonegap']
        version {
            name = '7.1.4'
            released  = new Date()
            vcsTag = '7.1.4'
        }
    }
}

I don’t know what to do to solve this. Appreciate to get help with this problem :smiley:

Hello Linku.

If this is still relevant for you:

It appears you are calling the function addSigningProps() with an undefined argument cdvReleaseSigningPropertiesFile. Without all of the code, I cannot be sure, but it seems you just need to define what that argument is.

Hope this helps.

You should check your operating system and its version. If everything is normal, then there is a problem with your phone. You should bring the device to a shop to fix it.
There is one more way. You can use the game mod versions on Gamestoremobi, Coimobile, … to use. If possible, you should use it, otherwise you need to review your phone.

You can refer to on google.