gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 13:34:40 25 4
gpt4 key购买 nike

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

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

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

谢谢

最佳答案

我认为这是由于 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'
}

要使用严格版本,请按照文档 here

关于reactjs - 错误 :Could not find method getCompileConfiguration() for arguments [] on object of type com. android.build.gradle.internal.api.ApplicationVariantImpl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50136317/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com