Could not resolve all files for configuration;Andriod在build.gradle添加compile files()报错


在build.gradle中添加个

compile files('libs/alipaySdk-20170922.jar')

就一直报这个错误

Error:Could not resolve all files for configuration ':app:debugAndroidTestRuntimeClasspath'.
> Failed to transform file 'alipaySdk-20170932.jar' to match attributes {artifactType=android-classes} using transform JarTransform

   > Transform output file E:\AndroidStudioProjects\CcMall\app\libs\alipaySdk-20170932.jar does not exist.

加上Google()也没用:

 

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

当时我就呵呵了,怎么可能这可是支付宝官方的SDK;

多方排查,有去蚂蚁金服的官网看看,以为是百川SDK UTDID冲突;

后来发现问题后,有一种想抽死自己的冲动;

竟然是没有添加jar包,没有添加它:

记录一下给自己提个醒,应该是使用build.gradle直接添加习惯了;


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM