{"componentChunkName":"component---src-templates-documentation-tsx","path":"/crashlytics/android-setup","result":{"data":{"mdx":{"body":"var _excluded = [\"components\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n/* @jsxRuntime classic */\n/* @jsx mdx */\n\nvar _frontmatter = {\n  \"title\": \"Crashlytics - Android Setup\",\n  \"description\": \"Additional Android steps for Crashlytics integration\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n    props = _objectWithoutProperties(_ref, _excluded);\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"If you're migrating from Fabric, make sure you remove the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"fabric.properties\"), \" file from your Android project. If you do not do this you will not receive crash reports on the Firebase console.\")), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"If you're using Expo, make sure to add the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"@react-native-firebase/crashlytics\"), \" config plugin to your \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"app.json\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"app.config.js\"), \". It handles the below installation steps for you. For instructions on how to do that, view the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/#expo\"\n  }, \"Expo\"), \" installation section.\")), mdx(\"h1\", {\n    \"id\": \"adding-firebase-crashlytics-gradle-tools\"\n  }, \"Adding Firebase Crashlytics Gradle Tools\"), mdx(\"p\", null, \"These steps are required, if you do not add these your app will most likely crash at startup with the following Error:\"), mdx(\"p\", null, \"\\\"The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration.\\nPlease review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.\\\"\", \"_\"), mdx(\"h2\", {\n    \"id\": \"1-add-the-google-repository-if-its-not-there-already\"\n  }, \"1. Add the Google repository (if it's not there already)\"), mdx(\"p\", null, \"Add the following line to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"android/build.gradle\"), \" file :\"), mdx(\"pre\", {\n    \"className\": \"language-groovy\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-groovy\"\n  }, mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\nbuildscript \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\n  repositories \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token function\"\n  }, \"google\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"(\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \")\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n\")), mdx(\"h2\", {\n    \"id\": \"2-add-the-firebase-crashlytics-plugin-dependency\"\n  }, \"2. Add the Firebase Crashlytics Plugin dependency\"), mdx(\"p\", null, \"Add the following dependency to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"android/build.gradle\"), \" file:\"), mdx(\"pre\", {\n    \"className\": \"language-groovy\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-groovy\"\n  }, mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\nbuildscript \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\n  dependencies \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\n    classpath \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token string\"\n  }, \"'com.google.firebase:firebase-crashlytics-gradle:3.0.6'\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ..\"), \"\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n\")), mdx(\"h2\", {\n    \"id\": \"3-apply-the-firebase-crashlytics-plugin-to-your-app\"\n  }, \"3. Apply the Firebase Crashlytics Plugin to your app\"), mdx(\"p\", null, \"Apply the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"com.google.firebase.crashlytics\"), \" plugin by adding the following to the top of your \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"android/app/build.gradle\"), \" file:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"apply plugin: 'com.android.application'\\napply plugin: 'com.google.gms.google-services' // apply after this line\\napply plugin: 'com.google.firebase.crashlytics'\\n// ..\\n\")), mdx(\"h2\", {\n    \"id\": \"4-optional-enable-crashlytics-ndk-reporting\"\n  }, \"4. (Optional) Enable Crashlytics NDK reporting\"), mdx(\"p\", null, \"Crashlytics NDK reporting allows you to capture Native Development Kit crashes, e.g. in React Native this will capture\\ncrashes originating from the Yoga layout engine.\"), mdx(\"p\", null, \"Add the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"firebaseCrashlytics\"), \" block line to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"android/app/build.gradle\"), \" file:\"), mdx(\"pre\", {\n    \"className\": \"language-groovy\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-groovy\"\n  }, \"android \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ...\"), \"\\n\\n    buildTypes \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n        release \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n            \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"/* Add the firebaseCrashlytics extension (by default,\\n            * it's disabled to improve build speeds) and set\\n            * nativeSymbolUploadEnabled to true along with a pointer to native libs. */\"), \"\\n\\n            firebaseCrashlytics \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n                nativeSymbolUploadEnabled \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token boolean\"\n  }, \"true\"), \"\\n                unstrippedNativeLibsDir \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token string\"\n  }, \"'build/intermediates/merged_native_libs/release/out/lib'\"), \"\\n            \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n            \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"// ...\"), \"\\n        \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n\")), mdx(\"h2\", {\n    \"id\": \"5-rebuild-the-project\"\n  }, \"5. Rebuild the project\"), mdx(\"p\", null, \"Once the above steps have been completed, rebuild your Android project:\"), mdx(\"pre\", {\n    \"className\": \"language-bash\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"npx react-native run-android\\n\")));\n}\n;\nMDXContent.isMDXComponent = true;","frontmatter":{"title":"Crashlytics - Android Setup","description":"Additional Android steps for Crashlytics integration","icon":null,"noindex":null},"excerpt":"If you're migrating from Fabric, make sure you remove the  fabric.properties  file from your Android project. If you do not do this you will…","tableOfContents":{"items":[{"url":"#adding-firebase-crashlytics-gradle-tools","title":"Adding Firebase Crashlytics Gradle Tools","items":[{"url":"#1-add-the-google-repository-if-its-not-there-already","title":"1. Add the Google repository (if it's not there already)"},{"url":"#2-add-the-firebase-crashlytics-plugin-dependency","title":"2. Add the Firebase Crashlytics Plugin dependency"},{"url":"#3-apply-the-firebase-crashlytics-plugin-to-your-app","title":"3. Apply the Firebase Crashlytics Plugin to your app"},{"url":"#4-optional-enable-crashlytics-ndk-reporting","title":"4. (Optional) Enable Crashlytics NDK reporting"},{"url":"#5-rebuild-the-project","title":"5. Rebuild the project"}]}]},"headings":[{"depth":1,"value":"Adding Firebase Crashlytics Gradle Tools"},{"depth":2,"value":"1. Add the Google repository (if it's not there already)"},{"depth":2,"value":"2. Add the Firebase Crashlytics Plugin dependency"},{"depth":2,"value":"3. Apply the Firebase Crashlytics Plugin to your app"},{"depth":2,"value":"4. (Optional) Enable Crashlytics NDK reporting"},{"depth":2,"value":"5. Rebuild the project"}],"parent":{"__typename":"File","relativePath":"crashlytics/android-setup.md"}},"next":null,"previous":null,"sidebar":{"raw":"[[\"Getting Started\",\"/\"],[\"Migration Guide to v22\",\"/migrating-to-v22\"],[\"Migration Guide to v23\",\"/migrating-to-v23\"],[\"TypeScript\",\"/typescript\"],[\"Platforms\",\"/platforms\"],[\"Release Notes\",\"/releases\"],[\"FAQs and Tips\",\"/faqs-and-tips\"],[\"Feature Requests\",\"https://invertase.canny.io/react-native-firebase\"],[\"Contributing\",\"https://github.com/invertase/react-native-firebase/blob/main/CONTRIBUTING.md\"],[\"AI Logic\",[[\"Usage\",\"/ai/usage\"]],\"//firebase.google.com/static/images/icons/firebase-ai-logic.svg\"],[\"Analytics\",[[\"Usage\",\"/analytics/usage\"],[\"Screen Tracking\",\"/analytics/screen-tracking\"],[\"Building an Analytics Funnel\",\"https://blog.theodo.com/2018/01/building-google-analytics-funnel-firebase-react-native\"]],\"//firebase.google.com/static/images/products/icons/run_analytics.svg\"],[\"App Check\",[[\"Usage\",\"/app-check/usage\"]],\"//firebase.google.com/static/images/products/icons/build_app_check.svg\"],[\"App Distribution\",[[\"Usage\",\"/app-distribution/usage\"]],\"//firebase.google.com/static/images/products/icons/run_app_distribution.svg\"],[\"Authentication\",[[\"Usage\",\"/auth/usage\"],[\"Social Auth\",\"/auth/social-auth\"],[\"Phone Auth\",\"/auth/phone-auth\"],[\"OpenID Connect Auth\",\"/auth/oidc-auth\"],[\"Multi-factor Auth\",\"/auth/multi-factor-auth\"]],\"//firebase.google.com/static/images/products/icons/build_auth.svg\"],[\"Cloud Firestore\",[[\"Usage\",\"/firestore/usage\"],[\"Usage with Emulator\",\"/firestore/emulator\"],[\"Usage with FlatLists\",\"/firestore/usage-with-flatlists\"],[\"Implementing Pagination\",\"/firestore/pagination\"],[\"Building a \\\"TODO\\\" app\",\"https://invertase.io/blog/getting-started-with-cloud-firestore-on-react-native\"]],\"//firebase.google.com/static/images/products/icons/build_firestore.svg\"],[\"Cloud Functions\",[[\"Usage\",\"/functions/usage\"],[\"Writing & Deploying Functions\",\"/functions/writing-deploying-functions\"]],\"//firebase.google.com/static/images/products/icons/build_functions.svg\"],[\"Cloud Messaging\",[[\"Usage\",\"/messaging/usage\"],[\"iOS Project Setup\",\"/messaging/usage/ios-setup\"],[\"iOS Permissions\",\"/messaging/ios-permissions\"],[\"Notifications\",\"/messaging/notifications\"],[\"iOS Notification Images\",\"/messaging/ios-notification-images\"],[\"Server Integration\",\"/messaging/server-integration\"]],\"//firebase.google.com/static/images/products/icons/run_cloud_messaging.svg\"],[\"Cloud Storage\",[[\"Usage\",\"/storage/usage\"]],\"//firebase.google.com/static/images/products/icons/build_storage.svg\"],[\"Core / App\",[[\"Usage\",\"/app/usage\"],[\"JSON Config\",\"/app/json-config\"],[\"Utils\",\"/app/utils\"]],\"//static.invertase.io/assets/social/firebase-logo.png\"],[\"Crashlytics\",[[\"Usage\",\"/crashlytics/usage\"],[\"Viewing crash reports\",\"/crashlytics/crash-reports\"]],\"//firebase.google.com/static/images/products/icons/run_crashlytics.svg\"],[\"Realtime Database\",[[\"Usage\",\"/database/usage\"],[\"Offline Support\",\"/database/offline-support\"],[\"Presence Detection\",\"/database/presence-detection\"]],\"//firebase.google.com/static/images/products/icons/build_realtime_database.svg\"],[\"In-App Messaging\",[[\"Usage\",\"/in-app-messaging/usage\"]],\"//firebase.google.com/static/images/products/icons/run_in_app_messaging.svg\"],[\"Installations\",[[\"Usage\",\"/installations/usage\"]],\"//static.invertase.io/assets/social/firebase-logo.png\"],[\"ML\",[[\"Usage\",\"/ml/usage\"]],\"//firebase.google.com/static/images/products/icons/build_ml.svg\"],[\"Remote Config\",[[\"Usage\",\"/remote-config/usage\"]],\"//firebase.google.com/static/images/products/icons/run_remote_config.svg\"],[\"Performance Monitoring\",[[\"Usage\",\"/perf/usage\"],[\"Axios Integration\",\"/perf/axios-integration\"],[\"KY Integration\",\"/perf/ky-integration\"]],\"//firebase.google.com/static/images/products/icons/run_performance.svg\"],[\"VertexAi\",[[\"Usage\",\"/vertexai/usage\"]],\"//static.invertase.io/assets/social/firebase-logo.png\"],[\"Legacy docs\",[[\"Migrating to v6\",\"/migrating-to-v6\"],[\"Legacy Docs (<= v5)\",\"https://v5.rnfirebase.io/docs/v5.x.x/getting-started\"]],\"//static.invertase.io/assets/social/firebase-logo.png\"]]"}},"pageContext":{"id":"e81a5af6-3c22-5d27-9abd-6dbb3810713e","next":"-------","previous":"-------"}},"staticQueryHashes":["3688227230"]}