android-找不到用于参数的方法getCompileConfiguration()[]

android-找不到用于参数的方法getCompileConfiguration()[],第1张

概述我收到以下错误.CouldnotfindmethodgetCompileConfiguration()forarguments[]onobjectoftypecom.android.build.gradle.internal.api.ApplicationVariantImpl.解决方法:我遇到了类似的问题,经过一段时间的互联网访问后,我发现了以下解决方案.如果您在build.gr

我收到以下错误.

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

解决方法:

我遇到了类似的问题,经过一段时间的互联网访问后,我发现了以下解决方案.
如果您在build.gradle中使用最新版本的Google-services,则需要进行以下更改:-

1)在项目级别build.gradle

        buildscript {            repositorIEs {                jcenter()                mavenLocal()                maven {                    url 'https://maven.Google.com/'                    name 'Google'                }            }            dependencIEs {                classpath 'com.androID.tools.build:gradle:3.1.2'                classpath 'com.Google.gms:Google-services:3.3.1'            }        }        allprojects {            repositorIEs {                jcenter()                mavenLocal()                maven {                    url 'https://maven.Google.com/'                    name 'Google'                }            }        }

2)在应用程序级别build.gradle

androID{    //All other    buildToolsversion '27.0.3'    }        dependencIEs {        // All other            implementation 'com.Google.firebase:firebase-database:15.0.1'        }        apply plugin: 'com.Google.gms.Google-services'

3)在gradle-wrapper.propertIEs中

distributionUrl = https://services.gradle.org/distributions/gradle-4.4-all.zip

总结

以上是内存溢出为你收集整理的android-找不到用于参数的方法getCompileConfiguration()[]全部内容,希望文章能够帮你解决android-找不到用于参数的方法getCompileConfiguration()[]所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1080708.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存