Could not resolve all dependencies for configuration ':app:retrolambdaConfi

Error:Execution failed for task ‘:app:compileRetrolambdaDebug’.

Could not resolve all dependencies for configuration ‘:app:retrolambdaConfig’.
Could not resolve net.orfjackal.retrolambda:retrolambda:2.1.0.
Required by:
project :app
Could not resolve net.orfjackal.retrolambda:retrolambda:2.1.0.
Could not load module metadata from C:\Users\Garnet.gradle\caches\modules-2\metadata-2.23\descriptors\net.orfjackal.retrolambda\retrolambda\2.1.0\22da77b0d76ea8df17298218f3ec1f87\descriptor.bin

根目录下的build.gradle如下:
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:2.2.2’
classpath ‘me.tatarka:gradle-retrolambda:3.2.5’
// 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
}

ext {
compileSdkVersion = 25
buildToolsVersion = “25.0.3”
minSdkVersion = 16
targetSdkVersion = 25
supportVersion = “25.0.0”
}

模块内的build.gradle如下:
apply plugin: ‘com.android.application’
apply plugin: ‘me.tatarka.retrolambda’
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

aaptOptions {
    cruncherEnabled = false
    useNewCruncher = false
}
defaultConfig {
    applicationId "com.xxx.xxx"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

sourceSets {
    //设置
    main {
        jniLibs.srcDirs = ["src/main/jniLibs"]
    }
}
configurations.all {
    resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}

}

dependencies {
compile fileTree(include: [‘*.jar’], dir: ‘libs’)
androidTestCompile(‘com.android.support.test.espresso:espresso-core:2.2.2’, {
exclude group: ‘com.android.support’, module: ‘support-annotations’
})
// compile ‘com.android.support.constraint:constraint-layout:1.0.1’
compile ‘com.android.support:multidex:1.0.1’
testCompile ‘junit:junit:4.12’
compile ‘com.squareup.retrofit2:retrofit:2.1.0’
compile ‘com.squareup.retrofit2:converter-gson:2.1.0’
compile ‘com.squareup.retrofit2:adapter-rxjava:2.1.0’
compile ‘com.squareup.retrofit2:converter-scalars:2.1.0’
compile ‘com.squareup.okhttp3:logging-interceptor:3.8.1’
compile ‘io.reactivex:rxandroid:1.2.0’
compile ‘com.jakewharton:butterknife:7.0.1’
compile ‘com.github.zhaokaiqiang.klog:library:1.6.0’
compile ‘com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.18’
compile ‘com.github.bumptech.glide:glide:3.7.0’
compile ‘org.greenrobot:eventbus:3.0.0’
compile ‘com.nineoldandroids:library:2.4.0’
compile ‘org.litepal.android:core:1.5.0’
compile ‘com.github.chaychan:SlideCloseLib:1.0.0’
}

在模块内的build.gradle中dependencies里面加上retrolambdaConfig’net.orfjackal.retrolambda:retrolambda:2.3.0’之后还是会报错,多次clean project也没有解决问题,把修改之后的项目移到另一个目录下面也会出现这个问题;
最后把未修改的代码放到新的目录下面,在其模块内的build.gradle中dependencies里面加上retrolambdaConfig’net.orfjackal.retrolambda:retrolambda:2.3.0’解决该问题

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值