繁体   English   中英

错误:无法在com.android.build.gradle.internal.api.ApplicationVariantImpl类型的对象上找到参数[]的getCompileConfiguration()方法

[英]Error:Could not find method getCompileConfiguration() for arguments [] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl

我正在研究React Native技术,一切正常,直到昨天和今天,当我在android工作室中打开react-native项目时,它给了我这个错误:

错误:无法在com.android.build.gradle.internal.api.ApplicationVariantImpl类型的对象上找到参数[]的getCompileConfiguration()方法。

请帮我解决此问题的最佳解决方案。

谢谢

我认为这是由于com.google.gms:google-services发布了一个与gradle构建工具不兼容的新版本,修复它我更改了android/build.gradle

dependencies {
  - classpath 'com.android.tools.build:gradle:2.2.+'
  - classpath 'com.google.gms:google-services:3.+'
  + classpath 'com.android.tools.build:gradle:2.2.3'
  + classpath 'com.google.gms:google-services:3.2.1'
}

要使用严格的版本,请按照此处的文档

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM