Android studio 金丝雀,Android Studio 3.0金丝雀 1: 项目刷新失败_android_开发99编程知识库...

我試圖在這個新的 Android Studio 3.0 Canary中裝載我的項目。 它在我以前的版 Android Studio 預覽中運行得很完美

這是我所面對的錯誤:Error:Could not resolve all dependencies for configuration ':sample:devCompileClasspath'.

Project :sample declares a dependency from configuration 'devCompile' to configuration 'dev' which is not declared in the descriptor for project :library.

我的gradle配置如下:

項目級別構建 Gradle:buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:3.0.0-alpha1'

classpath 'com.google.gms:google-services:3.0.0'

//NOTE: Do not place your application dependencies here; they belong

//in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

庫模塊 Gradle:apply plugin: 'com.android.library'

apply plugin: 'checkstyle'

android {

publishNonDefault true

compileSdkVersion 25

buildToolsVersion"25.0.3"

defaultConfig {

minSdkVersion 19

targetSdkVersion 25

versionName project.VERSION_NAME

versionCode project.VERSION_CODE.toInteger()

}

packagingOptions {

exclude 'META-INF/LICENSE.txt'

exclude 'META-INF/NOTICE.txt'

exclude 'AUTHORS'

exclude 'NOTICE'

}

buildTypes {

debug {

debuggable true

}

dev.initWith(buildTypes.debug)

staging.initWith(buildTypes.debug)

release {

minifyEnabled false

shrinkResources false

}

}

}

repositories {

flatDir {

dirs 'libs'

}

mavenLocal()

jcenter()

}

def ANDROID_SUPPORT_VERSION ="25.3.1"

def OK_HTTP3_VERSION ="3.6.0"

def GLIDE_VERSION ="3.7.0"

def GSON_VERSION ="2.8.0"

def AWS_KINESIS_VERSION ="2.4.2"

def PLAY_SERVICE_VERSION ="10.2.4"

dependencies {

compile(name: 'library-release', ext: 'aar')

compile"com.android.support:appcompat-v7:$ANDROID_SUPPORT_VERSION"

compile"com.android.support:design:$ANDROID_SUPPORT_VERSION"

compile"com.android.support:cardview-v7:$ANDROID_SUPPORT_VERSION"

compile"com.squareup.okhttp3:okhttp:$OK_HTTP3_VERSION"

compile"com.squareup.okhttp3:okhttp-urlconnection:$OK_HTTP3_VERSION"

compile"com.squareup.okhttp3:logging-interceptor:$OK_HTTP3_VERSION"

compile"com.google.code.gson:gson:$GSON_VERSION"

compile"com.google.firebase:firebase-messaging:$PLAY_SERVICE_VERSION"

compile"com.google.android.gms:play-services-location:$PLAY_SERVICE_VERSION"

compile"com.github.bumptech.glide:glide:$GLIDE_VERSION"

checkstyle('com.puppycrawl.tools:checkstyle:7.6.1')

compile"com.amazonaws:aws-android-sdk-kinesis:$AWS_KINESIS_VERSION"

}

apply plugin: 'com.google.gms.google-services'

task checkstyle(type: Checkstyle) {

showViolations = true

configFile file("config/checkstyle/checkstyle.xml")

description 'applies the checkstyle config to the java files'

source 'src/main/java'

include '**/*.java'

exclude '**/gen/**'

//empty classpath

classpath = files()

}

preBuild.dependsOn('checkstyle')

應用模塊 Gradle:apply plugin: 'com.android.application'

android {

compileSdkVersion 25

buildToolsVersion"25.0.3"

defaultConfig {

applicationId"com.sample.and"

minSdkVersion 19

targetSdkVersion 25

versionName project.VERSION_NAME

versionCode project.VERSION_CODE.toInteger()

android.defaultConfig.vectorDrawables.useSupportLibrary = true

}

buildTypes {

debug {

debuggable true

minifyEnabled false

shrinkResources false

}

dev.initWith(buildTypes.debug)

dev {

applicationIdSuffix".dev"

}

staging.initWith(buildTypes.debug)

staging {

applicationIdSuffix".staging"

}

release {

shrinkResources false

minifyEnabled false

}

}

}

repositories {

flatDir{

dirs '../library/libs'

}

mavenLocal()

jcenter()

}

configurations {

releaseCompile

stagingCompile

devCompile

}

dependencies {

compile 'com.android.support:appcompat-v7:25.3.1'

releaseCompile (project(path: ':library', configuration: 'release')) {

transitive = true

}

stagingCompile (project(path: ':library', configuration: 'staging')) {

transitive = true

}

devCompile (project(path: ':library', configuration: 'dev')) {

transitive = true

}

}

有誰遇到過同樣的問題?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值