gradle 设定项目':uni_links'时发生问题

h9a6wy2h  于 2022-12-13  发布在  其他
关注(0)|答案(1)|浏览(129)

我想在我的Flutter项目中使用uni_links包,但是当我运行它时,我得到了以下错误。

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':uni_links'.
> Could not resolve all files for configuration ':uni_links:classpath'.
   > Could not resolve com.android.tools.build:gradle:3.5.3.
     Required by:
         project :uni_links
      > Could not resolve com.android.tools.build:gradle:3.5.3.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom'. Received status code 403 from server: Forbidden
> Failed to notify project evaluation listener.
2
   > Could not get unknown property 'android' for project ':uni_links' of type org.gradle.api.Project.

有人能帮我吗?

toe95027

toe950271#

要解决此问题,请检查项目级别的build.gradle文件中是否有google()存储库。

buildscript {
    repositories {
        jcenter()
        google() //HAVE YOU MISS IT?
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
    }
}

allprojects {
    repositories {
        jcenter()
        google() //HAVE YOU MISS IT?
    }
}

相关问题