Mangesh Kadam
Mangesh Kadam

Reputation: 587

debuggable is true in release mode build?

debuggable=true in release mode apk. When I tried to hard code this property I am getting below error

"Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one".

So I updated build.gradle as below,

 buildTypes {
        release {
            minifyEnabled true
            debuggable false
            testCoverageEnabled = true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
        debug {
            testCoverageEnabled = true
            minifyEnabled false
            debuggable true

    }
}

But nothing seems working. What I am doing wrong? I am using Android Studio 2.2.2 and I have few flavors defined in build.gradle.

Upvotes: 1

Views: 4231

Answers (2)

Mangesh Kadam
Mangesh Kadam

Reputation: 587

testcoverageenabled = true was the problem. Changed to false and now debuggable=false working.

Upvotes: 8

Mangesh Kadam
Mangesh Kadam

Reputation: 587

My personal observation. I tried the same in sample hello word app, then debuggable=true property is not added to android manifest.

Upvotes: 0

Related Questions