无法获取http…/artifactory/oss snapshot local/.bolts-android-24.2.0.pm

jk9hmnmh  于 2021-07-09  发布在  Java
关注(0)|答案(1)|浏览(567)

问题是,当我尝试构建gradle时,它抛出:

Error:Could not GET 'http://oss.jfrog.org/artifactory/oss-snapshot-local/com/parse/bolts/bolts-android/24.2.0/bolts-android-24.2.0.pom'. Received status code 409 from server: Conflict

我已经试过下载jar了https://github.com/square/okhttp,而不是编译的网址,并没有工作,我正在运行的想法,所以我希望有人能帮助我
gradle项目:

buildscript {
        repositories {
            jcenter()
            maven {
                url "http://dl.bintray.com/populov/maven"
            }
            maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
            mavenCentral()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.1'
            classpath "io.realm:realm-gradle-plugin:1.2.0"
            classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
            classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
        }

        // Exclude the lombok version that the android plugin depends on.
        configurations.classpath.exclude group: 'com.android.tools.external.lombok'
    }

    allprojects {
        repositories {
            maven { url "http://dl.bintray.com/populov/maven" }
            maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
            mavenCentral()
            jcenter()
        }
    }

module:app gradle:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.21.7'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "com.rocketjourney"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 27
        versionName "3.26"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "com.rocketjourney.helpers.CustomTestRunner"
    }

    buildTypes {

        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

    }

    dexOptions {
        javaMaxHeapSize "4g"
        jumboMode = true
    }

    productFlavors {
        uiTesting {
            buildConfigField "String", "ApiUrl", "\"RestMockIsGonnaDoItsShitAnyway\""
            buildConfigField "String", "MixPanelToken", "\"6c2df05fb3fcdeb123368dd4874442d5d\""
            buildConfigField "String", "ParseKey", "\"JXblMQR8rQjcErhxpyIQRSsnJ30zoh5Y1dogdB6Z\""
            buildConfigField "String", "ParseToken", "\"S5yU4WKP1dNjwqSG0bGZYN2ebx9IGAAqjB9xakeD\""
            buildConfigField "String", "StravaAppID", "\"10129\""
            buildConfigField "String", "EnableInMemoryDatabase", "\"true\""
        }

        dev {
            minSdkVersion 21
            buildConfigField "String", "ApiUrl", "\"https://staging.rocketjourney.com\""
            buildConfigField "String", "MixPanelToken", "\"6c2df05b3fcdeb123368dd4874442d5d\""
            buildConfigField "String", "ParseKey", "\"JXblMQR8rQjcErhxpyIQRSsnJ30zoh5Y1dogdB6Z\""
            buildConfigField "String", "ParseToken", "\"S5yU4WKP1dNjwqSG0bGZYN2ebx9IGAAqjB9xakeD\""
            buildConfigField "String", "StravaAppID", "\"10129\""
            buildConfigField "String", "EnableInMemoryDatabase", "\"false\""
        }

        prod {
            buildConfigField "String", "ApiUrl", "\"https://app.rocketjourney.com\""
            buildConfigField "String", "MixPanelToken", "\"82a62adf416018c3b05edb1b3ebe2550\""
            buildConfigField "String", "ParseKey", "\"LLaPidufFZ3ofDnHKOHg4wzy0oEft6djMZm4lBjq\""
            buildConfigField "String", "ParseToken", "\"lGKfqrAFu9WjZksUKLJdntacTVUtpEXD8RSwghW8\""
            buildConfigField "String", "StravaAppID", "\"8812\""
            buildConfigField "String", "EnableInMemoryDatabase", "\"false\""
        }
    }

    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
    }
    sourceSets {
        main {
            res.srcDirs = ['src/main/res/layouts/home',
                           'src/main/res/layouts/login',
                           'src/main/res/layouts/settings',
                           'src/main/res/layouts/workouts',
                           'src/main/res/layouts/teams',
                           'src/main/res/layouts/timeline',
                           'src/main/res/layouts',
                           'src/main/res']
        }
    }

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

retrolambda {
    defaultMethods false
    incremental true
}

repositories {

mavenCentral()
    maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
    maven { url "https://jitpack.io" }
    flatDir { dirs 'libs' }
    flatDir { dirs '../aars' }
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    compile 'com.android.support:multidex:1.0.1'

// Note: This dependency must be at the top. There is a manifest-merger bug that does not allow
// the app to compile if this dependency is listed at the bottom the list.
compile 'com.github.boxme:squarecamera:1.1.0'

compile project(':racetracker')

compile "com.android.support:cardview-v7:${supportLibraryVersion}"
compile "com.android.support:design:${supportLibraryVersion}"
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
compile "com.android.support:recyclerview-v7:${supportLibraryVersion}"
compile "com.android.support:support-annotations:${supportLibraryVersion}"
compile 'com.android.tools.build:gradle:2.2.1'
compile "com.google.android.gms:play-services-gcm:${playServicesVersion}"
compile "com.google.android.gms:play-services-location:${playServicesVersion}"
compile "com.google.android.gms:play-services-maps:${playServicesVersion}"
compile 'com.google.code.gson:gson:2.2.4'

compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.squareup.okhttp3:okhttp:3.5.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup:otto:1.3.8'
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
compile 'com.jakewharton:butterknife:6.1.0'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'

compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile fileTree(include: 'Parse-*.jar', dir: 'libs')
compile 'com.parse.bolts:bolts-android:1.4.0'

compile "com.amazonaws:aws-android-sdk-core:${amazonVersion}"
compile "com.amazonaws:aws-android-sdk-cognito:${amazonVersion}"
compile "com.amazonaws:aws-android-sdk-s3:${amazonVersion}"
compile "com.amazonaws:aws-android-sdk-ddb:${amazonVersion}"

compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') { transitive = true; }
compile "com.mixpanel.android:mixpanel-android:4.6.4"
compile 'io.branch.sdk.android:library:1.13.1'

compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.sothree.slidinguppanel:library:3.0.0'
compile 'com.github.aakira:expandable-layout:1.5.1@aar'
compile 'com.cocosw:bottomsheet:1.3.0@aar'
compile 'com.ogaclejapan.smarttablayout:library:1.1.3@aar'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.github.H07000223:FlycoPageIndicator:f8bf3fc347'
compile 'com.timehop.stickyheadersrecyclerview:library:0.4.3'
compile 'com.gordonwong:material-sheet-fab:1.2.1'
compile 'info.hoang8f:android-segmented:1.0.6'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.makeramen:roundedimageview:2.2.0'
compile 'org.buraktamturk:loadingview:1.0.0@aar'
compile 'com.commit451:PhotoView:1.2.5'
compile 'com.lguipeng.bubbleview:library:1.0.0'

androidTestCompile (name:'cloudtestingscreenshotter_lib', ext:'aar')
// Testing-only dependencies
testCompile "com.android.support:support-annotations:${supportLibraryVersion}"

androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile "com.android.support.test.espresso:espresso-core:${espressoVersion}"
androidTestCompile("com.android.support.test.espresso:espresso-contrib:${espressoVersion}") {
    exclude group: 'com.android.support'
}

androidTestCompile 'com.github.andrzejchm.RESTMock:android:0.1.1'
androidTestCompile 'tools.fastlane:screengrab:0.3.2'

//Slider for end run
compile 'com.github.rey5137:material:1.2.4'
}
// This forces all direct and transitive dependencies to use the same support-annotations version.
configurations.all {
    resolutionStrategy {
        force "com.android.support:support-annotations:${supportLibraryVersion}"
        force "com.android.support:appcompat-v7:${supportLibraryVersion}"
        force "com.android.support:design:${supportLibraryVersion}"
        force "com.android.support:support-v4:${supportLibraryVersion}"
        force "com.squareup.okhttp3:okhttp:${supportLibraryVersion}"
        force "com.parse.bolts:bolts-android:${supportLibraryVersion}"
//        force "com.google.code.gson:gson:${supportLibraryVersion}"
        force "com.android.support:recyclerview-v7:${supportLibraryVersion}"
        force "com.android.support:cardview-v7:${supportLibraryVersion}"
        force "io.fabric.sdk.android:fabric:${supportLibraryVersion}"
        force "com.android.tools:annotations:${supportLibraryVersion}"
        force "com.google.guava:guava:${supportLibraryVersion}"
        force "com.android.support.test:rules:${supportLibraryVersion}"
        force "com.android.support.test:runner:${supportLibraryVersion}"
        force "com.android.support.test.espresso:espresso-core:${supportLibraryVersion}"
        failOnVersionConflict()
    }
    repositories {
        jcenter()
    }
}
fhity93d

fhity93d1#

添加googlemaven存储库并尝试一下。我也遇到了类似的依赖问题。
google存储库托管android特定的工件,包括androidsdk。有关用法示例,请参阅相关文档。
添加googlemaven存储库(https://dl.google.com/dl/android/maven2/)只需将此添加到构建脚本中:
构建.gradle

repositories
{
google()
}

相关问题