Getting Error “Gradle DSL method not found: 'compile()'” when Syncing Build.Gradle

后端 未结 10 835
后悔当初
后悔当初 2020-11-30 09:42

\"Error\"project

10条回答
  •  我在风中等你
    2020-11-30 10:32

    You have 2 different build.gradle (sometimes more depending on you)

    Only one of them is your app's gradle, then the other one is project's gradle.

    If you put your dependencies project's gradle you can get error : Gradle DSL method not found: 'compile()'

    Put your dependencies in app's build.gradle then it will work.

提交回复
热议问题