Reputation: 41749
I made a signed APK and installed it on the device (Galaxy S5). The run the app and tried to attach to it from IntelliJ IDEA 13.1. But IDEA cannot see any process on my device
You can see that part belonging to the device is empty.
If I install the debug version of the app, then I can attack the debugger to it. But not if it's been created as a signed APK.
Where am I making a mistake? Why I cannot debug signed APK?
Upvotes: 1
Views: 1027
Reputation: 231
If the app is signed and installed over the Google play store, attaching to a process is not allowed. Currently the Google play store rejects the upload of any apk with:
android:debuggable="true"
Upvotes: 0
Reputation: 41749
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.
Upvotes: 1
Reputation: 1544
Have you set android:debuggable="true"
in the application tag of your manifest file? Also, take a look at How to debug apk signed for release?
Upvotes: 3