Does Crashlytics work with Android Instant Apps and if so, how do you setup your project correctly?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Besides what the accepted answer says, I also needed to add the next lines at the build.gradle file of the application (apk) module to get it running.
Yes, Crashlytics does work with Android Instant Apps, in fact it is the recommended crash reporting solution at this stage as it has been tested and works fine.
For setup:
Step 1
Open the
build.gradle
file in your base feature module and follow the steps on the public docs site to configure Crashlytics as normal.Step 2
At the top level of your base feature module
build.gradle
file, add the following Crashlytics flag:Step 3 (optional but recommended)
Add the Instant App library dependency in your base library project
build.gradle
if not already there as per the docs:Note: to use this dependency you will need to add the newer
maven.google.com
repository to your gradle files if you haven't already (see here for details).Then in your code, after setting up Crashlytics, set a boolean value to log if the current run is an Instant App:
Update as of Aug 2017 - New issue that breaks support
A recent tools update seems to have caused a new issue when using Crashlytics and Instant Apps that logs the following error:Until the issue is fixed, please try this as a workaround: after building, find the file
com_crashlytics_build_id.xml
, open it up, copy the<string>
from there that contains your Fabric key and paste it into your normalstrings.xml
file for your feature module. Then re-build and run.Update as of Nov 15, 2017 - Issue fixed
The issue above is now fixed as of Fabric gradle plugin v1.24.5. As your gradle file should have:
You shouldn't need to do anything but sync up your build to pull down the updated plugin with fix.
I just tested with 1.24.5 and it was fine.
My test instant app built, I triggered a crash, and my dashboard logged it.
If any issue persists, please report at Google issue tracker they will re-open to examine.