1

I'm building an app for Android. And I am emulating a Nexus 5 to test it. It works perfectly fine on the emulator but when I try to test it on my real Nexus 5 it crashes when I click on a button.

Is there any way to get the report of this error? Like have it sent to my email address so I can check it and try to fix it or something like that. Because I have no idea what's wrong.

halfer
  • 19,824
  • 17
  • 99
  • 186
Marcos Guimaraes
  • 1,243
  • 4
  • 27
  • 50
  • 1
    "Is there any way to get the report of this error?" -- examine LogCat: https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this – CommonsWare Mar 17 '17 at 18:45
  • LogCat is the right answer, but just for fun: [Crashlytics](https://fabric.io/kits/android/crashlytics). It can actually send you e-mail about crashes. – Markus Kauppinen Mar 17 '17 at 18:49
  • How can I examine the LogCat if the app doesn't work on my real device? On the emulator it works fine. – Marcos Guimaraes Mar 17 '17 at 18:49

1 Answers1

1

I decided to follow Markus Kauppinen's advice and set up Crashlytics in my app. The problem was related to an OutOfMemoryError which was caused by a Bitmap that I was loading in my application. I fixed the problem by adding this following line in my Manifest:

android:largeHeap="true"
Marcos Guimaraes
  • 1,243
  • 4
  • 27
  • 50