[英]Error:Could not find method getCompileConfiguration() for arguments [] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl
I' am working on React Native technology and everything was working fine until yesterday and today when I opened react-native project in the android studio it gave me this error: 我正在研究React Native技术,一切正常,直到昨天和今天,当我在android工作室中打开react-native项目时,它给了我这个错误:
Error:Could not find method getCompileConfiguration() for arguments [] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
错误:无法在com.android.build.gradle.internal.api.ApplicationVariantImpl类型的对象上找到参数[]的getCompileConfiguration()方法。
Please help me out with the best solution to resolve this issue. 请帮我解决此问题的最佳解决方案。
Thanks 谢谢
I think this is due to com.google.gms:google-services
released a new version that is not compatible with the gradle build tools, to fix it I changed android/build.gradle
我认为这是由于
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'
}
To use strict versions, as per the docs here 要使用严格的版本,请按照此处的文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.