How to debug the Android App in release mode using Android studio

前端 未结 5 1843
不知归路
不知归路 2020-12-14 14:48

For some reason I have to run my Android App in release mode.I have to run through the code when running the app just like we use in debug mode. My break points are not hitt

5条回答
  •  伪装坚强ぢ
    2020-12-14 15:32

    In my case, I have created the debug configuration same as previous release build and started debugging. It means you have to give sign build in debug version also in build gradle.

    signingConfigs {
        config {
            keyAlias 'abc'
            keyPassword 'xyz'
            storeFile file('<>.keystore')
            storePassword 'password'
        }
    }
    buildTypes {
      debug {
          debuggable true
          signingConfig signingConfigs.config
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    

    So It will have the same sign as release build and you can debug when it runs.

提交回复
热议问题