![](/img/trans.png)
[英]Error: Could not parse the Android application Module's Gradle Config
[英]Could not parse the Android Application Module's Gradle config
我想使用 firebase 數據庫,但是當我點擊“連接到 firebase”按鈕時,我遇到了這個問題......誰能幫幫我???
Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync.
此問題與您的一個或多個插件有關。
粘貼這個:
android.debug.obsoleteApi=true
到您的 gradle.properties 文件。
現在使 rebuld。 您必須看到帶有問題插件的堆棧跟蹤。 關閉此插件,同步並嘗試再次連接到 Firebase - 現在必須成功。
成功連接到 Firebase 后,您可以返回您的插件,從 gradle.properties 文件中刪除該行並重新同步。 警告會再次出現,但這並不重要,因為 Firebase 已經配置好了。
PS 就我而言,我有 2 個有問題的插件:Sceneform 和 Crashlytics。
我也遇到了同樣的問題,但我找到了解決方案然后解決了這個問題
我的案例是build.gradle(:app)
的依賴關系,當我測試評論該行時它已修復
testImplementation 'junit:junit:5'
我遇到了類似的問題,並在我的項目的 build.gradle 中發現以下條目是問題的根源:
compile 'com.google.api-client:google-api-client:1.22.0'
compile 'com.google.http-client:google-http-client-gson:1.22.0'
另一種可能性是項目中的 gzip 可能是罪魁禍首。 在您的項目文件夾中搜索並刪除它們,讓 gradle 為您重新同步它。
可能的替代解決方案: https : //github.com/socketio/engine.io-client-java/issues/13 https://github.com/ACRA/acra/issues/159
我修復它的方法是從應用程序級別 build.gradle 注釋掉Fabric
插件( apply plugin: 'io.fabric'
)。 然后,使用 Firebase 助手連接到 firebase。 連接成功后,可以取消對fabric插件的注釋。
就我而言,這很簡單。 我剛剛在 build.gradle 中將我的 compileSdk 32 更改為 compileSdk 31。
android {
compileSdk 31
defaultConfig {
applicationId "com.example.grocerystore"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.