You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

同步Gradle文件时Firebase Crashlytics报错问题求助

Hey, I’ve run into this exact Crashlytics error during Gradle sync before—let’s walk through the most effective fixes to get you back on track:

Fixes for Error:Execution failed for task ':app:fabricGenerateResourcesDebug'. > Crashlytics Developer Tools error.
  • Double-check your Firebase configuration file
    Make sure your google-services.json is placed correctly in the root of your app module (not the project root). If you’ve updated Firebase/Crashlytics lately, re-download the file from the Firebase Console—old credentials can cause authentication failures here.

  • Fix mismatched or outdated dependencies
    Fabric is fully migrated to Firebase now, so any leftover Fabric plugins or dependencies will break things. Also, ensure your Crashlytics Gradle plugin and library versions are compatible. Here’s a working setup for reference in your build files:

    // Top-level build.gradle
    buildscript {
        dependencies {
            // Use the latest compatible version (check Firebase docs for updates)
            classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
        }
    }
    
    // App-level build.gradle
    plugins {
        id 'com.android.application'
        id 'com.google.gms.google-services'
        id 'com.google.firebase.crashlytics'
    }
    
    dependencies {
        implementation 'com.google.firebase:firebase-crashlytics:18.4.0'
    }
    

    Remove any lines referencing io.fabric or old Crashlytics artifacts.

  • Clean, rebuild, and clear caches
    Cached build data is a common culprit here. First, run these commands in your terminal:

    ./gradlew clean
    ./gradlew assembleDebug
    

    If that doesn’t help, invalidate Android Studio’s caches: go to File > Invalidate Caches... > Invalidate and Restart. This wipes out corrupted IDE state that might be messing with the sync.

  • Check network and proxy settings
    The Crashlytics plugin needs to connect to Firebase’s servers to generate resources. Make sure your machine has a stable internet connection, and no firewall/proxy is blocking requests to Firebase endpoints. If you’re on a corporate network, you might need to whitelist Firebase domains.

  • Confirm package name matches Firebase
    Double-check that the package name in your AndroidManifest.xml is identical to the one registered in your Firebase project. A tiny typo here will prevent the plugin from authenticating properly.

If none of these work, dig into the full Gradle build log (expand the error in Android Studio’s Build tab)—there’s usually a more detailed message hidden there that points to the real issue, like missing permissions or invalid project IDs.

内容的提问来源于stack exchange,提问作者Sam

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 06:24:31