android - 无法在gitlab中建立提交(gradle)

标签 android gradle gitlab build.gradle gitlab-ci

当我提交并将更改推送到gitlab时,assembly会报错:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':somebible-id-client-app'.
> Could not resolve all dependencies for configuration ': somebible-id-client-app:_secondaryDebugApkCopy'.
   > Could not resolve ru.somebible.android:statistic:0.0.5.
     Required by:
         project :somebible-id-client-app
      > Skipped due to earlier error

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 22s
ERROR: Job failed: exit code 1 

我的build.gradle:
buildscript {
    repositories {
        mavenCentral()
        maven {
            url 'http://jenkins01.mobile.somebible.ru:7700/nexus/content/repositories/somebible-internal/'
        }
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath 'me.tatarka:gradle-retrolambda:3.2.5'
    }
}

repositories {
    mavenCentral()
    maven {
        url 'http://jenkins01.mobile.somebible.ru:7700/nexus/content/repositories/somebible-internal/'
    }
    google()
    jcenter()
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'idea'

idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'

    defaultConfig {
        applicationId "ru.somebible.somebibleidclientapp"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        debug {
            useProguard false
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
        prod {
            resValue "string", "app_name", "Id Client App"
        }
        secondary {
            applicationId "ru.somebible.somebibleidclientappsecondary"
            resValue "string", "app_name", "Id Client Secondary App"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    lintOptions {
        abortOnError false
    }

    dependencies {
        ext.support_version = '25.3.1'

        compile fileTree(include: ['*.jar'], dir: 'libs')

        compile project(':somebible-id')
        apt 'com.jakewharton:butterknife-compiler:8.0.1'
        compile "com.android.support:appcompat-v7:$ext.support_version"
        compile "com.android.support:design:$ext.support_version"
        compile 'com.jakewharton:butterknife:8.0.1'
        compile 'io.reactivex:rxjava:1.1.3'
        compile 'io.reactivex:rxandroid:1.1.0'
        compile 'com.hannesdorfmann.mosby:mvp:2.0.1'
        compile 'com.annimon:stream:1.1.2'
        compile 'com.squareup.picasso:picasso:2.5.2'

        compile 'ru.somebible.android:statistic:0.0.5'

        testCompile 'junit:junit:4.12'
    }
}
dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

最重要的是,即使没有前缀ApkCopy,也没有这样的过程。也就是说,要查看问题在本地是不可能的,因为在本地没有这样的过程,并且在本地一切正常。请朝正确的方向指示。

谢谢您的回答!

最佳答案

Gradle尝试下载 Artifact ru.somebible.android:statistic,但未成功下载,因为它无法在任何已知的 Artifact 存储库中找到它。我假设 Artifact 已发布在此存储库中:'http://jenkins01.mobile.somebible.ru:7700/nexus/content/repositories/somebible-internal/'
在这种情况下,请确保您的构建计算机可以访问此存储库,并确保可以在该存储库中实际找到该 Artifact 。

关于android - 无法在gitlab中建立提交(gradle),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50735810/

相关文章:

android - 如何加速 Flex Mobile 并提高其性能

android - 在 GLSurfaceView 上绘制 2D

android - 从服务访问android位置?

android - 未找到 SDK 位置。 ANDROID_HOME - 在 MAC 上的 eclipse 中构建一个 gradle 项目

maven - 如何将Maven/Gradle项目及其所有依赖项安装到本地存储库?

android - Gradle 不更新

gitlab:将存储库移动到 gitlab 中的另一个组

git - 当我使用参数化分支 : fatal: Couldn't find remote ref refs/heads/${BUILD_BRANCH} 时,Jenkins 无法构建

Android Horizo​​ntal RecyclerView wrap_content

ssh - 运行 ssh 命令时 Gitlab CI 作业挂起