解决No signature of method编译报错的问题

编译Android工程时,如果出现类似如下的错误:

Build file '/Users/zhao/sw/workspace/myProject/app/build.gradle' line: 3

A problem occurred evaluating project ':app'.
> No signature of method: build_3iciaioon0bu97t06e9d2wjmp.android() is applicable for argument types: (build_3iciaioon0bu97t06e9d2wjmp$_run_closure1) values: [build_3iciaioon0bu97t06e9d2wjmp$_run_closure1@4e439b45]

问题一般是在build.gradle的android节点中有错误的配置,比如配置了kotlinOptions,但是没有引入kotlin-android插件。因为错误信息中没有给出详细的错误原因,所以可以逐个注释子节点进行排查。

猜你喜欢

转载自blog.csdn.net/chenzhengfeng/article/details/130886543