Android gradle build Error:(9, 0) Gradle DSL method not found: 'compile()'.

后端 未结 5 763
时光取名叫无心
时光取名叫无心 2020-11-28 08:36

I am getting the following build error when I try and sync my project:

Error:(9, 0) Gradle DSL method not found: \'compile()\'
Possible causes:The project \         


        
5条回答
  •  无人及你
    2020-11-28 09:13

    Saw reports that the problem occurred for other reasons, but this solved for me.

    If you carry out any changes in the Project Structure (Android Studio) and press OK, Gradle will be synchronized, but this type of synchronization, if the dependency block has something like:

    This block will stay this way after synchronization:

    One way to solve the problem is to insert a line break to stay as it was before the synchronization or put a semi-colon between the two statements.

    I hope it helps.

提交回复
热议问题