1337ingDisorder
1337ingDisorder

Reputation: 887

How do I view Android LogCat output from an exported APK running on a physical device?

When I run my Android app using the Run -> Run menu option in Eclipse, the app launches on my phone and while it's running I'm able to view the log output in LogCat within Eclipse.

When I export my app, copy the .APK onto the phone, install it from the APK, and run the installed app, I don't see any output in LogCat.

Is there a way to view that log output?

Context:

I'm in the process of implementing in-app purchases. I think I have it working, and when I try using the in-app purchases from within the app if it's being launched on the phone via Eclipse's Run menu, it activates the Google Play store but I get an error that says "This version of the application is not configured for billing through Google Play".

After some googling I found that this error gets thrown because the APK needs to have a signature that matches the APK I've uploaded to the developer console in order for the in-app billing to work, and running from Eclipse's Run menu doesn't provide that signature.

So I've tried installing the signed APK that matches the one I've uploaded to the developer console and now when I try to use the in-app billing from within the app, nothing happens at all. It doesn't seem to even try to launch the Google Play store like it does when run through Eclipse's Run menu.

So basically I need to see what kind of error messages it's outputting when I try to use the in-app billing specifically from the exported, signed APK.

Upvotes: 7

Views: 11155

Answers (3)

ThatsME
ThatsME

Reputation: 157

It's a common practice that exported app should not contain any log statements. Try downloading the app manually from google play store to ensure that the in-app billing is working perfectly. And also to check what error messages are displayed on screen

Upvotes: 0

thuongle
thuongle

Reputation: 537

  1. Install the app https://play.google.com/store/apps/details?id=org.jtb.alogcat to view the log directly in your phone.
  2. Use adb logcat
  3. Use DDMS and click on your app thread.

Upvotes: 3

Sazid
Sazid

Reputation: 2827

Try adb logcat from the console or cmd, which will give you all the logs of the device.

Here's a small tutorial: http://forum.xda-developers.com/showthread.php?t=1726238 and official docs: http://developer.android.com/tools/help/logcat.html

If your device is rooted, you can also try this one: https://play.google.com/store/apps/details?id=com.nolanlawson.logcat

Upvotes: 12

Related Questions