Error:Could not get unknown property 'repositoryUrl' for project ':react-native:ReactAndroid' of type org.gradle.api.Project.

release.gradle找到

def getRepositoryUrl() {
    return hasProperty('repositoryUrl') ? property('repositoryUrl') : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}

def getRepositoryUsername() {
    return hasProperty('repositoryUsername') ? property('repositoryUsername') : ''
}

def getRepositoryPassword() {
    return hasProperty('repositoryPassword') ? property('repositoryPassword') : ''
}

替换为:

def getRepositoryUrl() {
    return findProperty('repositoryUrl') != null ? property('repositoryUrl') : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}

def getRepositoryUsername() {
    return findProperty('repositoryUsername') !=null ? property('repositoryUsername') : ''
}

def getRepositoryPassword() {
    return findProperty('repositoryPassword') != null ? property('repositoryPassword') : ''
}

你可能感兴趣的:(Error:Could not get unknown property 'repositoryUrl' for project ':react-native:ReactAndroid' of type org.gradle.api.Project.)