Android 2.2. I need to debug my signed APK on my Nexus S. How can this be done using Eclipse?
I start the app on my phone and then...?
Android 2.2. I need to debug my signed APK on my Nexus S. How can this be done using Eclipse?
I start the app on my phone and then...?
Set the debuggable=true
in the manifest, export, install and sign the the app. Connect the device via USB, enable USB debugging. Then open the DDMS perspective, select the device and attach to your app's process (you will see the package name listed). If you have a rooted device, you can connect to any process if adb is running as root.
When device connect to your eclipse running mechine , set debuggable=true in manifest file and enable debug mode in android phone it can view current running log using logcat, otherwise
You can debug your running application using adb tools from the command line
adb logcat
- View device log
will display the current logcat (debug messages)
adb logcat [ <filter-spec> ]
using you can filter only your given debug messages
for configure debug tool view http://developer.android.com/guide/developing/tools/adb.html
In Android Studio stable, you have to add the following 2 lines to application
in the AndroidManifest
file:
android:debuggable="true"
tools:ignore="HardcodedDebugMode"
The first one will enable debugging of signed APK, and the second one will prevent compile-time error.
After this, you can attach to the process via "Attach debugger to Android process" button.
You have two ways ..