How to debug apk signed for release?

前端 未结 6 1050
走了就别回头了
走了就别回头了 2020-11-27 12:17

I have an apk which I\'ve signed and uploaded to Android Market, and installed on my phone. I would like to debug this release apk (by means of Eclipse) whilst it is running

6条回答
  •  無奈伤痛
    2020-11-27 12:45

    Besides Manuel's way, you can still use the Manifest.

    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.

提交回复
热议问题