2

I'm working in Android Studio 2.2 RC on OSX 10.11 , and after implementing In-App Billing, after having generated my app-release.apk and having installed it on my phone, I noticed that when the purchase is successful and Ads are removed from my App, something in a secondary Activity of mine, is causing a NullPointerException and Activity is not loading.

To figure out what is causing it, I need to somehow debug the app while the In-App Purchase is active (debug.apk won't let me complete iAP) so...

How do I debug a release apk that is installed on my phone?

Daniele
  • 4,163
  • 7
  • 44
  • 95
  • Why do you need to debug the release apk? You can debug before generating apk. In-App purchase result can be set for testing. – TOP Sep 13 '16 at 06:55

1 Answers1

2

Use the following steps:

  1. Enable debug in your device and connect usb to your device use
  2. command adb devices to list connected devices
  3. use command adb -s "device id" logcat and hit enter

It will show you a lot of log message but don't worry. Just test your phone and it will show you the error. Use ctrl + z to stop the log and you can check your error.

Please read this link. It will help more. Hope this will help you.

Community
  • 1
  • 1
K.Sopheak
  • 22,904
  • 4
  • 33
  • 78
  • Thank you for the answer, I have tried going to the platorm tools dir. and running this command ./adb -d "193xxxx" logcat but it shows me the "guide" to use adb, s I guess it's not working, if it helps I'm on OS X – Daniele Sep 13 '16 at 07:07
  • pls, try again. I updated my answer. use adb -s "device id" in the third step. – K.Sopheak Sep 13 '16 at 07:10