There’s nothing more frustrating than trying to find the exact spot where something broke in your code, much less finding it while the device and your app is running. Crashlytics + Nativetap Android Studio Plugin is a handy addition to Android Studio designed to allow jumping straight into the code in order to fix a bug reported by Crashlytics. Over the next few minutes we’ll be walking through the steps necessary to setup this integration with Nativetap.
The Nativetap Desktop App is required in order to work with the plugin, requiring that you be logged in so that you can parse the report or start a session. The Desktop App for your OS (Windows, OSX, Linux) can be downloaded from here.
In addition you must have the Nativetap Mobile App installed on your mobile device before continuing. Otherwise you will not be able to start a session to test out your application on our remote device(s).
- Open Android Studio and navigate to File -> Settings -> Plugins. Select Browse repositories and find Nativetap and click Install.
- Once installed, you will be prompted to restart Android Studio.
- Once you get a fail report on your Crashlytics dashboard, copy a share link to it. The URL address can be found by clicking Share button under the chart.
- Open your application project with Android Studio and click on the leftmost plugin button (“Process Crashlytics report”) from toolbar (also available from Tools -> Nativetap). Then simply paste the URL you copied earlier into the textbox (if not already automatically included) and press Process Report.
- The exact class and method in which the problem occurred will open now in your editor window. Also, there will be a visible popup with an error reason (an exception content) and a breakpoint in a place of the exception will be automatically set up for you. Thanks to this, you can jump straight into solving your problem.
- After you fix your application, you can launch a test of it with our plugin – straight from Android Studio. To do so, click on the second plugin button (“Debug with Nativetap”).
- If a device on which an error occurred is available, this device will appear in your newly opened window with the report URL you are currently working on. In case the device is unavailable, a list of possible devices will show up instead.
- You can also use a new or previously set up breakpoint by using the Attach debugger to Android process option.
- Once you run a session, you can edit your application code while it is still running asynchronously. When you have finished with fixes, a new application version can be deployed directly into the current session device. After you click on Debug with Nativetap, a new window will inform you about your session status.
- Select the Deploy and debug button to deploy the newly built project and run on the selected device – all of this just as if you had a device physically connected to your computer via USB!
- You can end a session from the plugin / IDE level. This can be achieved by clicking the End session button under the Debug with Nativetap window.
And that’s it! You’ve successfully reviewed your Crashlytics report and tested out your application through Android Studio with the Nativetap plugin!