Daniele
Daniele

Reputation: 4343

Android: Debug app-release.apk

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?

Upvotes: 2

Views: 940

Answers (1)

K.Sopheak
K.Sopheak

Reputation: 23144

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.

Upvotes: 3

Related Questions