gradle build : Could not find method compile() for arguments

In build.gradle file add one of the following:
dependencies {
compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
}

  • What went wrong:
    A problem occurred evaluating root project 'webrowser'.

Could not find method compile() for arguments [com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Cause

edit wrong android/build.gradle

Solution

edit correct android/app/build.gradle.

Subscribe to Post, Code and Quiet Time.

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe