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

Could not resolve cn.jiguang.sdk:jcore:+. Failed to list versions for cn.jiguang.sdk:jcore. #483

Open
Yaohong9257 opened this issue Nov 26, 2024 · 1 comment

Comments

@Yaohong9257
Copy link

pubspec.yaml版本:

jpush_flutter: ^3.1.2

android/build.gradle:

buildscript {
    ext.kotlin_version = '1.8.22'
    repositories {
        google()
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        maven { url 'https://maven.aliyun.com/repository/public/' }
        maven { url 'https://maven.aliyun.com/repository/central' }
        maven { url 'https://repo.huaweicloud.com/apache/maven/maven-3/' }
        maven { url 'https://maven.aliyun.com/repository/spring/'}
        maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
        mavenLocal()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}

编译是报以下的错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve cn.jiguang.sdk:jcore:+.
     Required by:
         project :app > project :jpush_flutter > cn.jiguang.sdk:jpush:5.5.0
      > Failed to list versions for cn.jiguang.sdk:jcore.
         > Unable to load Maven meta-data from https://maven.aliyun.com/repository/public/cn/jiguang/sdk/jcore/maven-metadata.xml.
            > Could not HEAD 'https://maven.aliyun.com/repository/public/cn/jiguang/sdk/jcore/maven-metadata.xml'.
               > Read timed out
@Yaohong9257
Copy link
Author

把aliyun的源注释后解决了。

buildscript {
    ext.kotlin_version = '1.8.22'
    repositories {
        google()
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
//        maven { url 'https://maven.aliyun.com/repository/public/' }
//        maven { url 'https://maven.aliyun.com/repository/central' }
//        maven { url 'https://repo.huaweicloud.com/apache/maven/maven-3/' }
//        maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
//        maven { url 'https://maven.aliyun.com/repository/spring/'}
//        maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
        mavenLocal()
        mavenCentral()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant