简体   繁体   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

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.

相关问题 React Native 找不到 com.android.tools.build:gradle:3.4.2 - React Native Could not find com.android.tools.build:gradle:3.4.2 找不到 org.gradle.initialization.DefaultSettings 类型的设置“MyApplicationExample”的参数的方法 repositories() - Could not find method repositories() for arguments on settings ‘MyApplicationExample' of type org.gradle.initialization.DefaultSettings 找不到com.android.tools.build:graddle-链接返回404 - Could not find com.android.tools.build:graddle - Links return 404 找不到参数[android.arch.lifecycle:extensions:1.1.1]的方法Implementation() - Could not find method implementation() for arguments [android.arch.lifecycle:extensions:1.1.1] com.android.build.api.transform.TransformException: - com.android.build.api.transform.TransformException: android 构建失败并出现错误 - null 不是 object - android build fails with error - null is not an object 找不到 support-compat.aar (com.android.support:support-compat:26.1.0) - Could not find support-compat.aar (com.android.support:support-compat:26.1.0) 反应/节点构建错误。 找不到模块“历史”的声明文件。 'node_modules/history/index.js' 隐含一个 'any' 类型 - React/node build error. Could not find a declaration file for module 'history'. 'node_modules/history/index.js' implicitly has an 'any' type 我一直在尝试获取 API recipepuppy.com 并且我不断收到此消息:语法错误和 500 内部服务器错误 - I have been trying to fetch an API recipepuppy.com and I keep getting this : Syntax Error and 500 Internal server error 函数未正确部署,错误提示“找不到有效的构建” - Functions is not deployed correctly with an error saying that 'could not find a valid build'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM