Why can I see server response in my signed apk android?

161 Views Asked by At

I generated a signed apk using a .jks file for release. It got uploaded on playstore for beta testing also. But if I use the app with my andorid-studio I can see the server responses in my log-cat which should not be the case as far as I know.

When I generate the apk, i can see the build type release

Screenshot

and my build.gradle of module is:

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "PACKAGE_NAME"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 1
    multiDexEnabled true

    versionName "1.0.2"

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
sourceSets {
    main {
        res.srcDirs = ['src/main/res', 'src/main/res/menu']
        java.srcDirs = ['src/main/java', 'src/main/java/2', 'src/main/java/PACKAGE_NAME/Models']
    }
}
productFlavors {
}
}

Can anyone explain?

1

There are 1 best solutions below

0
Sudhakar Raju On

The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept.

You can use your logs like below

public class AppLog {

    public static void info(String tag, String message) {
       if (BuildConfig.DEBUG) {
        Log.i(tag, message);
      }
   }
}

Refer : https://developer.android.com/reference/android/util/Log.html