Android应用io.fabric插件失败:找不到verboseGradlePlugin属性
First off, let's address the root cause here: the old Fabric plugin you're using is no longer maintained by Google, and it has compatibility issues with older Gradle/Android Gradle Plugin (AGP) versions like your setup (Gradle 4.4 + AGP 3.1.2). Here are two actionable solutions, ordered by recommendation:
Solution 1: Migrate to Firebase's Native Crashlytics Plugin (Recommended)
Google has fully integrated Crashlytics into Firebase, so you don't need the Fabric plugin anymore. Follow these steps to clean up and reconfigure:
Remove all Fabric-related configurations
- In your project-level
build.gradle, delete the Fabric classpath entry:classpath 'io.fabric.tools:gradle:x.x.x' // Remove this line - In your app-level
build.gradle, remove the Fabric plugin apply line:apply plugin: 'io.fabric' // Remove this line - Delete any
fabric.propertiesorcrashlytics.propertiesfiles from your project. - Remove the old Crashlytics dependency:
implementation 'com.crashlytics.sdk.android:crashlytics:x.x.x' // Remove this
- In your project-level
Add Firebase Crashlytics compatible with your AGP version
- In project-level
build.gradle, add the Firebase Crashlytics classpath (pick a version that supports AGP 3.1.2;2.9.2is a safe bet):dependencies { classpath 'com.android.tools.build:gradle:3.1.2' classpath 'com.google.gms:google-services:4.3.10' // Ensure this is compatible classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2' } - In app-level
build.gradle, apply the Firebase Crashlytics plugin after the Android plugin:apply plugin: 'com.android.application' apply plugin: 'com.google.firebase.crashlytics' // Add this apply plugin: 'com.google.gms.google-services' // Keep this if you use other Firebase services - Add the Firebase Crashlytics dependency:
dependencies { implementation 'com.google.firebase:firebase-crashlytics:18.2.10' }
- In project-level
Sync and test
Clean your project (./gradlew clean), restart Android Studio, and sync your Gradle files. This should eliminate the Fabric plugin entirely and resolve the property error.
Solution 2: Fix the Fabric Plugin Property Issue (If You Must Keep Fabric)
If you absolutely need to stick with the old Fabric plugin, the error likely stems from a misconfigured property type somewhere in your build files. Here's what to check:
- Check for incorrect property assignments: Ensure you haven't accidentally set
verboseGradlePluginas a string instead of a boolean. For example, avoid lines like:
It should be:verboseGradlePlugin = "true" // Wrong: this is a stringverboseGradlePlugin = true // Correct: boolean type - Use a Fabric plugin version explicitly tested with AGP 3.1.2: Try version
1.26.1(some users report this works better with older AGP versions than 1.24.0/1.25.4). Update your project-level classpath to:classpath 'io.fabric.tools:gradle:1.26.1' - Check Gradle system properties: When running Gradle tasks, ensure you're passing the property as a boolean, not a string. Use:
(Avoid quotes around./gradlew assembleDebug -DverboseGradlePlugin=truetrue/false.)
A final note: Your Gradle and AGP versions are quite outdated (released in 2018). If possible, consider upgrading them to a more recent stable version (e.g., AGP 4.2.x with Gradle 6.7.1) to avoid compatibility issues with Firebase services long-term.
内容的提问来源于stack exchange,提问作者Danylo Oliinyk

