Could not find method implementation()

编译时出现该问题

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method implementation() for arguments [com.android.support:appcompat-v7:26.1.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

原因:

    implementation是gradle版本3.0之后才支持的,出现该问题代表你的gradle版本过低。

解决方案

方案一:将implementation改为compile
方案二:升级build.gradle文件中的Gradle版本

你可能感兴趣的:(Could not find method implementation())