이 명령어를 실행하면 Flutter 앱의 Firebase 구성이 최신 상태로 유지되고 Android의 경우 필요한 Crashlytics Gradle 플러그인이 앱에 추가됩니다.
완료되면 Flutter 프로젝트를 다시 빌드합니다.
flutterrun
(선택사항) Flutter 프로젝트에서 --split-debug-info 플래그(및 필요에 따라 --obfuscate 플래그)를 사용하는 경우 앱에 대한 읽을 수 있는 스택 트레이스를 표시하려면 추가 단계가 필요합니다.
Apple 플랫폼: 프로젝트에서 Flutter 기호(dSYM 파일)를 자동으로 생성하여 Crashlytics에 업로드할 수 있도록 프로젝트에서 권장 버전 구성(Flutter 3.12.0 이상 및 Crashlytics Flutter 플러그인 3.3.4 이상)을 사용하는지 확인합니다.
Android:Firebase CLI(v.11.9.0 이상)를 사용하여 Flutter 디버그 기호를 업로드합니다. 난독화된 코드 빌드에서 비정상 종료를 보고하기 전에 디버그 기호를 업로드해야 합니다.
FIREBASE_APP_ID: 패키지 이름이 아닌 Firebase Android 앱 ID
Firebase Android 앱 ID 예시: 1:567383003300:android:17104a2ced0c9b9b
Firebase 앱 ID를 찾아야 하나요?
Firebase 앱 ID를 찾는 방법에는 2가지가 있습니다.
google-services.json 파일에서 mobilesdk_app_id 값이 앱 ID입니다.
Firebase Console에서 프로젝트 설정으로 이동합니다.
내 앱 카드까지 아래로 스크롤한 다음 원하는 Firebase 앱을 클릭하여 앱 ID를 찾습니다.
PATH/TO/symbols: 애플리케이션을 빌드할 때 --split-debug-info 플래그에 전달하는 디렉터리와 동일한 디렉터리입니다.
2단계: 비정상 종료 핸들러 구성
FlutterError.onError를 FirebaseCrashlytics.instance.recordFlutterFatalError로 재정의하여 Flutter 프레임워크 내에서 발생하는 모든 오류를 자동으로 포착할 수 있습니다.
voidmain()async{WidgetsFlutterBinding.ensureInitialized();awaitFirebase.initializeApp();// Pass all uncaught "fatal" errors from the framework to CrashlyticsFlutterError.onError=FirebaseCrashlytics.instance.recordFlutterFatalError;runApp(MyApp());}
Flutter 프레임워크에서 처리하지 않는 비동기 오류를 포착하려면 PlatformDispatcher.instance.onError를 사용합니다.
Future<void>main()async{WidgetsFlutterBinding.ensureInitialized();awaitFirebase.initializeApp();FlutterError.onError=(errorDetails){FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);};// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to CrashlyticsPlatformDispatcher.instance.onError=(error,stack){FirebaseCrashlytics.instance.recordError(error,stack,fatal:true);returntrue;};runApp(MyApp());}
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\niOS+ Android Android (NDK) Flutter Unity \n\n\u003cbr /\u003e\n\nThis quickstart describes how to set up Firebase Crashlytics in your app\nwith the Firebase Crashlytics SDK so that you can get comprehensive crash\nreports in the Firebase console.\n\nSetting up Crashlytics requires tasks both in the Firebase console and\nyour IDE (like adding a Firebase configuration file and the Crashlytics\nSDK). To finish setup, you'll need to force a test crash to send your first\ncrash report to Firebase.\n\nBefore you begin\n\n1. If you haven't already, [add Firebase](/docs/ios/setup) to your Apple\n project. If you don't have an Apple app, you can download a\n [sample app](/docs/samples).\n\n2. **Recommended** : To automatically get\n [breadcrumb logs](/docs/crashlytics/customize-crash-reports#get-breadcrumb-logs)\n to understand user actions leading up to a crash, non-fatal, or ANR event,\n you need to enable Google Analytics in your Firebase project.\n\n - If your existing Firebase project doesn't have Google Analytics\n enabled, you can enable Google Analytics from the\n [**Integrations** tab](https://console.firebase.google.com/project/_/settings/integrations/analytics) of your\n settings \\\u003e *Project settings*\n in the Firebase console.\n\n - If you're creating a new Firebase project, enable Google Analytics\n during the project creation workflow.\n\n \u003cbr /\u003e\n\n**Step 1** : Add the Crashlytics SDK to your app\n\nUse Swift Package Manager to install and manage Firebase dependencies.\n| Visit [our installation guide](/docs/ios/installation-methods) to learn about the different ways you can add Firebase SDKs to your Apple project, including importing frameworks directly and using CocoaPods.\n\n1. In Xcode, with your app project open, navigate to **File \\\u003e Add Packages**.\n2. When prompted, add the Firebase Apple platforms SDK repository: \n\n```text\n https://github.com/firebase/firebase-ios-sdk.git\n```\n| **Note:** New projects should use the default (latest) SDK version, but you can choose an older version if needed.\n3. Choose the Crashlytics library.\n4. To take advantage of [breadcrumb logs](/docs/crashlytics/customize-crash-reports#get-breadcrumb-logs), also add the Firebase SDK for Google Analytics to your app. Make sure that [Google Analytics is enabled](https://support.google.com/firebase/answer/9289399#linkga) in your Firebase project.\n5. Add the `-ObjC` flag to the *Other Linker Flags* section of your target's build settings.\n6. *(macOS only)* In your `Info.plist`, add the key `NSApplicationCrashOnExceptions` and set it to `YES`.\n7. When finished, Xcode will automatically begin resolving and downloading your dependencies in the background.\n\nNext, configure the Firebase module:\n\n1. Import the Firebase module in your `App` struct or `UIApplicationDelegate`:\n\n Swift \n\n ```swift\n import Firebase\n ```\n\n Objective-C \n\n ```objective-c\n @import Firebase;\n ```\n2. Configure a `FirebaseApp` shared instance, typically in your app delegate's\n `application(_:didFinishLaunchingWithOptions:)` method:\n\n Swift \n\n ```swift\n // Use the Firebase library to configure APIs.\n FirebaseApp.configure()\n ```\n\n Objective-C \n\n ```objective-c\n // Use the Firebase library to configure APIs.\n [FIRApp configure];\n ```\n\n**Step 3**: Force a test crash to finish setup\n\nTo finish setting up Crashlytics and see initial data in the\nCrashlytics dashboard of the Firebase console, you need to force a test\ncrash.\n\n\u003cbr /\u003e\n\nAnd that's it! Crashlytics is now monitoring your app for crashes.\nVisit the [Crashlytics dashboard](https://console.firebase.google.com/project/_/crashlytics) to view and investigate\nall your reports and statistics.\n\nNext steps\n\n- [Customize your crash report setup](/docs/crashlytics/customize-crash-reports) by adding opt-in reporting, logs, keys, and tracking of non-fatal errors.\n\n\u003c!-- --\u003e\n\n- [Integrate with Google Play](/docs/crashlytics/integrate-with-google-play) so that you can filter your Android app's crash reports by Google Play track directly in the Crashlytics dashboard. This allows you to better focus your dashboard on specific builds."]]