Could not resolve all files for configuration ‘:debugCompileClasspath‘. > Could not find runtime....

假期回来打开电脑更新一下项目,结果就出现了下面这个问题:

 

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':debugCompileClasspath'.
> Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0).
  Searched in the following locations:
  https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar

各种百度说要添加maven { url 'https://maven.google.com' }这句话:

 

allprojects {
  repositories {
      mavenLocal()
      maven { url 'https://maven.google.com' } // <-- add this!
      jcenter()
}

结果添加如下所示之后各种rebuild没效果

 

allprojects {
    repositories {
        jcenter()
        mavenLocal()
        maven {
            url 'https://maven.google.com'
            name 'Google'
        }
        maven {
            url "https://maven.google.com"
        }
        maven { url 'https://jitpack.io' }
    }
}

最终解决jcenter()一定要放在最后面才可以。黑人式问号???

坑爹啊~一脸懵逼

 

// keep this at the end
        jcenter()

最终结果如下这样,再rebuild一下就解决了

 

allprojects {
    repositories {
        mavenLocal()
        maven {
            url "https://maven.google.com"
        }
        maven { url 'https://jitpack.io' }
        jcenter()
    }
}

后续补充:大家遇到这问题的项目是不是都引用kotlin的?目前我跟踪了几个报此错误此解决方式的项目是都满足这条件。知道的同志们评论区探讨吧~



作者:筱宓dawnLing
链接:https://www.jianshu.com/p/9de30197b528
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

failed The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin. :app:mergeDebugResources :app:mapDebugSourceSetPaths :app:checkDebugAarMetadata :app:processDebugMainManifest :app:javaPreCompileDebug :app:mergeDebugAssets :app:checkDebugDuplicateClasses :app:mergeDebugNativeLibs :app:dataBindingMergeDependencyArtifactsDebug :JetpackMvvm:compileDebugKotlin :JetpackMvvm:bundleLibRuntimeToJarDebug org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'. org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3) to match attributes {artifactType=android-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. org.gradle.internal.resolve.ArtifactNotFoundException: Could not find agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3). org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'. org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3) to match attributes {artifactType=android-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. org.gradle.internal.resolve.ArtifactNotFoundException: Could not find agentweb-4.1.3.aar (com.just.agentweb:agentweb:4.1.3). org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspa
03-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值