簡體   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