Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配置完之后项目编译还是报错呢 #9

Closed
Zhusyi opened this issue Dec 6, 2021 · 5 comments
Closed

配置完之后项目编译还是报错呢 #9

Zhusyi opened this issue Dec 6, 2021 · 5 comments
Labels
invalid This doesn't seem right

Comments

@Zhusyi
Copy link

Zhusyi commented Dec 6, 2021

现在buildGradle 是3.6.3 另外一个gradle是6.7.1-all版本的 ,as是4.2.2版本的。
配置完classpath以及下载安装完插件之后,编译完一些第三方的库都报错。
Could not resolve all task dependencies for configuration ':app:huaweiDebugCompileClasspath'.
请问是为什么呢?需要怎么调整

@trycatchx
Copy link
Owner

trycatchx commented Dec 6, 2021

问题是无法解析 classpath 引入的网络依赖

  1. 6.7.1 版本 对应的 buildGradle 需要使用: classpath 'com.android.tools.build:gradle:4.2.0'。你确认一下。
  2. 是否配置
buildscript {
    repositories {
    // ..
        mavenCentral()
    }

    dependencies {
        classpath 'io.github.trycatchx:rocketx:1.0.4'
    }
}

@Zhusyi
Copy link
Author

Zhusyi commented Dec 6, 2021

repositories {
google()
jcenter()
mavenCentral()
maven {url 'http://developer.huawei.com/repo/'}
//友盟
maven { url 'https://repo1.maven.org/maven2/' }

}
dependencies {
    classpath "com.android.tools.build:gradle:4.2.0"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
    classpath "com.tencent.android.tpns:tpnsplugin:1.7.0"
    classpath 'com.huawei.agconnect:agcp:1.4.1.300'

    classpath 'io.github.trycatchx:rocketx:1.0.4'
}

distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip
这是我这边的配置,gradle跟tool也有尝试过配置跟demo一样的版本,还是编译不过去

@Zhusyi
Copy link
Author

Zhusyi commented Dec 6, 2021

implementation 'com.taobao.android:securityguardaar3:5.4.171@aar'
还有有依赖淘宝这种形式的,我不知道跟这个有没有影响,报错信息里面好像只有淘宝这几块提示错误

@Zhusyi
Copy link
Author

Zhusyi commented Dec 6, 2021

刚刚用demo去尝试依赖淘宝这几个仓库也是报同样的错误,看来极有可能是这块的问题?

@trycatchx
Copy link
Owner

@Zhusyi 使用 implementation 'com.taobao.android:securityguardaar3:5.4.94@aar' 所有版本的 aar 在 :
淘宝仓库

原因是 5.4.171 缺少了 pom.xml ,而5.4.94 不缺 pom.xml ,如果非要用 5.4.171 版本 下载 aar 依赖进入即可。

后面建议 运行有问题,先剔除 rockectx ,自身项目运行通过后再接入。

@trycatchx trycatchx added the invalid This doesn't seem right label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants