简体   繁体   中英

Gradle 5, maven deployer: unknown property uniqueVersion

I use eclipse with gradle buildship. My build.gradle contains

uploadArchives { 
    repositories {
        mavenDeployer {            
            configuration = configurations.deployerJars
            uniqueVersion = false

            repository(url: 'dav:http://...') {
                authentication(userName: '...', password: '...')
            }
            snapshotRepository(url: 'dav:http://...') {
                authentication(userName: '...', password: '...')
            }
        }
    }
}

This leads to the error message

Could not run build action using Gradle distribution
'https://services.gradle.org/distributions/gradle-5.4-bin.zip'.
...
Could not set unknown property 'uniqueVersion' for object of type 
org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer.

What can I do about it?

I ran into the same error when I attempted to build an old project in Android Studio 3.4, with Android SDK version 28. The old project was built using Android Studio 2.2.3 and Android SDK version 23.

I just commented out the line uniqueVersion = False , did a clean rebuild an viola, no more errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM