Error:(30, 0) Could not find method compile() for arguments

前端 未结 2 926
萌比男神i
萌比男神i 2020-12-21 10:55

I get this error. I\'m pretty confused because i check everything in sdk manager and it\'s all updated (i think so).

Error:(30, 0) Could not find meth

2条回答
  •  悲&欢浪女
    2020-12-21 11:28

    You can't use the compile() DSL in the top level file.

    Delete this block:

    dependencies {
        compile 'com.android.support:appcompat-v7:+'
    }
    

    and add the dependency in the dependencies block inside the app/build.gradle file.

提交回复
热议问题