【问题标题】:Unable to build with Support Library on Travis CI/Android SDK v20无法在 Travis CI/Android SDK v20 上使用支持库构建
【发布时间】:2014-08-26 16:31:19
【问题描述】:

我希望这不应该太具有挑战性,但是:

目前我正在尝试在 Android/Travis CI 中构建一个项目,您可以通过 here 找到该项目。我正在尝试使用 Android L 开发人员预览版,并使用 Travis-CI 进行构建。我希望使用Gradle SDK Manager 插件可以让我做到这一点。不幸的是,事实并非如此。我不知道我的 build.gradle 文件是否设置不正确,或者是什么,但我希望有人能指出我正确的方向。

Build error:

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring project ':app'.

    > Could not resolve all dependencies for configuration ':app:_testConfigDebugCompile'.
        > Could not find any version that matches com.android.support:appcompat-v7:20.+.

Required by:

MinimalBible:app:unspecified

build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
    }
}

apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId 'org.bspeice.minimalbible'
        minSdkVersion 8
        targetSdkVersion 20
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    compile 'com.squareup.dagger:dagger:1.2.1'
    provided 'com.squareup.dagger:dagger-compiler:1.2.1'

    compile 'com.android.support:appcompat-v7:20.+'
}

如果需要任何进一步的信息,请告诉我。

【问题讨论】:

标签: android gradle android-studio


【解决方案1】:

试试这样的:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    //force complie with 20.0.0
    compile ('com.android.support:appcompat-v7:20.0.0'){force = true}
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.1'
}

【讨论】:

    猜你喜欢
    • 2016-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多