Is gradle release build still debugging?

According to Gradle docs, the default value for the "debug" type of "release" buildType is false. However, if I explicitly set it to false or not, my build version always seems to be debugged (I can see the logcat output). Am I misinterpreting this property? Can someone explain?

Here is my build.gradle:

buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4.2' } } apply plugin: 'android' dependencies { compile project(':facebook-android-sdk-3.0.1:facebook') compile project(':google-play-services_lib') compile project(':nineoldandroids') compile project(':SlidingMenu-master:library') compile project(':ViewPagerIndicator') compile project(':volley') compile project(':windowed-seek-bar') compile files('compile-libs/androidannotations-2.7.1.jar', 'libs/Flurry_3.2.1.jar', 'libs/google-play-services.jar', 'libs/gson-2.2.4.jar', 'libs/picasso-1.1.1.jar', 'libs/crittercism_v3_0_11_sdkonly.jar', 'libs/gcm.jar', 'libs/apphance-library.jar') } android { buildToolsVersion "17.0" compileSdkVersion 17 signingConfigs { debug { storeFile file('keystores/debug.keystore') } release { storeFile file('keystores/release.keystore') storePassword "***" keyAlias "***" keyPassword "***" } } buildTypes { release { signingConfig signingConfigs.release sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src', 'normal'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } } } } } 
+6
source share
3 answers

Logcat browsing is not related to whether the application is debugged or not.

If you see the process in DDMS, your application is debugged (if you do not look at the emulator, in which case all applications are considered debugged).

+7
source

If you use Build -> Generate Signed APK in Android Studio, use the assembleDebug gradle task instead of assembleRelease . Try to complete the assembleRelease task manually, and the flag being debugged should be false

+6
source

To ensure that debugging is not allowed, you can declare debuggable=false in the application tag in AndroidManifest.xml. I don’t know if this will help in your case.

+1
source

Source: https://habr.com/ru/post/949350/


All Articles