[英]Could not parse the Android Application Module's Gradle config
I wanna use firebase database but when I clicked on "Connect to firebase" button, I got this problem.... can anyone help me???我想使用 firebase 数据库,但是当我点击“连接到 firebase”按钮时,我遇到了这个问题......谁能帮帮我???
Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync.
This problem is connected with one or more of your plugins.此问题与您的一个或多个插件有关。
Paste this:粘贴这个:
android.debug.obsoleteApi=true
to your gradle.properties file.到您的 gradle.properties 文件。
Now make rebuld.现在使 rebuld。 You must see a stacktrace with the problem plugin.
您必须看到带有问题插件的堆栈跟踪。 Switch off this plugin, sync and try to connect to Firebase again - must be success now.
关闭此插件,同步并尝试再次连接到 Firebase - 现在必须成功。
After successful connection to Firebase you can return your plugins, remove that line from the gradle.properties file and resync.成功连接到 Firebase 后,您可以返回您的插件,从 gradle.properties 文件中删除该行并重新同步。 Warning will appear again, but it is not important, because Firebase has configured already.
警告会再次出现,但这并不重要,因为 Firebase 已经配置好了。
PS In my case I had 2 problem plugins: Sceneform and Crashlytics. PS 就我而言,我有 2 个有问题的插件:Sceneform 和 Crashlytics。
I was also having same problem but I Found The Solution Then To Solve This problem我也遇到了同样的问题,但我找到了解决方案然后解决了这个问题
My case was in the dependencies of build.gradle(:app)
it fixed when I tested commenting the line我的案例是
build.gradle(:app)
的依赖关系,当我测试评论该行时它已修复
testImplementation 'junit:junit:5'
I faced similar issue and found the following entry in my project's build.gradle to be the source of issue:我遇到了类似的问题,并在我的项目的 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'
https://code.luasoftware.com/tutorials/android/how-to-add-firebase-to-android/#gradle-config-parsing-error https://code.luasoftware.com/tutorials/android/how-to-add-firebase-to-android/#gradle-config-parsing-error
Another possibility is that gzips in your project might be the culprits.另一种可能性是项目中的 gzip 可能是罪魁祸首。 Search it up within your project folder and delete them, let gradle re-sync it for you.
在您的项目文件夹中搜索并删除它们,让 gradle 为您重新同步它。
Possible alternative solutions: https://github.com/socketio/engine.io-client-java/issues/13 https://github.com/ACRA/acra/issues/159可能的替代解决方案: https : //github.com/socketio/engine.io-client-java/issues/13 https://github.com/ACRA/acra/issues/159
The way I fixed it was to comment out Fabric
plugin ( apply plugin: 'io.fabric'
) from the app level build.gradle.我修复它的方法是从应用程序级别 build.gradle 注释掉
Fabric
插件( apply plugin: 'io.fabric'
)。 Then, connect to firebase using the Firebase assistant.然后,使用 Firebase 助手连接到 firebase。 After connection is successful, you can uncomment the fabric plugin.
连接成功后,可以取消对fabric插件的注释。
It's quite simple in my case.就我而言,这很简单。 I'd just changed my compileSdk 32 to compileSdk 31 in build.gradle.
我刚刚在 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.