Could not find com.android.tools.build:gradle:3.0.1

后端 未结 3 400
终归单人心
终归单人心 2021-02-02 18:10

When I try to build my project with gradle wrapper I get this error:

./gradlew

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred c         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-02 18:43

    just wanted to leave an extra tip. When I installed Android Studio, I read somewhere that it was recommended to leave this configuration (with the '+' symbol)

    build.gradle (project)

    dependencies {
            classpath 'com.android.tools.build:gradle:+'
            .....
            #more lines here
    }
    

    However, the project I am using uses an old version of gradle, and this line always requested the latest version. Took me a while to figure it out.

提交回复
热议问题