By default, when I change Build Variants
to release
I don't get any Logs on the logcat, but I do need to read release logs of my app, how can I enable this?

- 15,672
- 28
- 94
- 206
-
1Change your log level. I may be wrong but as I understand it `Log.d` calls are removed when a release version is exported - I'm not sure what other levels (if any) are also removed. – Squonk Sep 01 '14 at 18:02
-
@Squonk I have also recently observed that Log.v logs are also not exposed in release build. Do any one know what can be the reason for it? – Manmohan Soni Oct 16 '19 at 12:40
6 Answers
Add android:debuggable="true"
(default is false) to your Manifest inside the <application>
tag.
android:debuggable
Whether or not the application can be debugged, even when running on a device in user mode — "true" if it can be, and "false" if not.
You can disable debugging by removing the android:debuggable attribute from the tag in your manifest file, or by setting the android:debuggable attribute to false in your manifest file.
Edit
You may need to add the following to your build.gradle
file inside the android{...} tag:
lintOptions {
checkReleaseBuilds false
}
And as a side-note: Right on the device the Logs are always written, no matter if your application's debuggable is set to false or true. But via the LogCat in Android Studio it's only possible if debuggable is set to true. (Just tested this)

- 8,084
- 8
- 48
- 62

- 35,075
- 22
- 89
- 84
-
5I don't think this answer is correct. At least, the docs it cites don't say that turning on `android:debuggable` will turn on logging. In fact, https://developer.android.com/studio/publish/preparing.html#publishing-configure is fairly clear that turning off logging and turning off debugging are two separate things. The OP asked how to turn on logging. – LarsH Oct 27 '17 at 18:26
-
P.S. Please correct me if I'm wrong, citing a source that says that `android:debuggable="true"` enables logging. – LarsH Oct 27 '17 at 18:34
-
4You're somewhat right, but `debuggable` means that the Android Monitor in Android Studio can be attached to the currently running APK. This enables the Logcat to show the log statements like in debug builds. Other than that: This answer is now a little bit over three years old - so most probably you should switch to the corresponding `build.gradle` property called `debuggable` which can be set depending on the buildType. – reVerse Oct 28 '17 at 09:44
You should add
android {
buildTypes {
release {
debuggable true
In this case you can use Log.
or System.out.println
and see logs.
If you cannot run release version (app
is disabled), and error is shown: "apk is not signed. Please configure the signing information for the selected flavor using the Project Structure dialog", see app-release-unsigned.apk is not signed.

- 26,736
- 15
- 188
- 224
-
5This works for me. Having logs in release build is necessary at lease after enabling proguard for the first time. But don't forget to make `debuggable false` for production builds :) – MohK Nov 19 '19 at 09:51
-
@MohK, agree with you. Strange, but in another project I have `debuggable false` in `release` build, but see logs and debugging does not work even in `true` state. :) – CoolMind Nov 19 '19 at 11:39
-
It seems it only works with System.out.println() in the new versions of AS. – IldiX Feb 26 '20 at 16:06
-
-
-
@IldiX, I have `debuggable false` in `release` build (`minifyEnabled true`, `shrinkResources true`), but `Log.d()` works. AS 3.6.1. – CoolMind Mar 04 '20 at 13:38
-
I do not like the other solution because then you are not testing how the App really is deployed.
A better solution is to open the Android Device Monitor where you can see the logs even when in release configuration with debuggable=false
.
Find it here:
Tools -> Android -> Android Device Monitor
Update:
Android Device Monitor was removed in Android Studio 3.2. However, it is still present in SDK, and you can use it to see the logs (it is located in $ANDROID_SDK/tools/
)

- 7,484
- 8
- 63
- 85
-
3http://joxi.ru/eAOl5EWu8Ll5ro App from market with debuggable not mentioned in manifest (thus, it's false). Nothing - in AS LogCat or in DeviceMonitor – Den Drobiazko Jul 08 '15 at 09:22
-
5
-
@DenRimus, in Play Market, I think, an application should be in release mode. So, there can be turned off all logs. – CoolMind May 19 '17 at 09:17
-
You won't be able to filter this way because you can't see which log corresponds to your package. – JensV Sep 07 '17 at 12:47
-
-
@IHC_Applroid No, if the App isn't set as debuggable, you will only see the pid, tag, level and message. – JensV Sep 21 '17 at 04:41
-
Note too that in ADM LogCat window, you also can't filter on tags *by typing in the live filter field.* That field seems to filter only on message text. Instead, you can add saved filters to filter by tag. – LarsH Oct 27 '17 at 19:51
-
1Android Device Monitor was removed in AS 3.2 - https://developer.android.com/studio/profile/monitor However, it is still present in SDK, and you can use it to see the logs (it is located in `$ANDROID_SKD/tools/`) – Vadim Kotov May 28 '19 at 14:38
-
You can also use 3rd party app like [Facebook Flipper](https://fbflipper.com/) to get the logs even in release version. – Vadim Kotov Jun 06 '19 at 11:08
-
1There's a typo: should be `$ANDROID_SDK/tools/` instead of `$ANDROID_SKD/tools/` - unfortunately I cannot save my edit – Remigius Stalder Apr 07 '21 at 14:52
This approach will obviously help you to get logs while testing the production build. But be careful while uploading your app to Google Play Store, Toggle debuggable
to false
before uploading to production.
buildTypes {
debug {
manifestPlaceholders = [crashlyticsCollectionEnabled: "false"]
}
release {
manifestPlaceholders = [crashlyticsCollectionEnabled: "false"]
lintOptions {
checkReleaseBuilds false
abortOnError false
}
shrinkResources true
minifyEnabled true
debuggable true
signingConfig signingConfigs.productionrelease
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
set crashlyticsCollectionEnabled
to false
to avoid your crashes to report to Google Play-Store while debugging.

- 1,827
- 1
- 25
- 38

- 71
- 4
debuggable true
in build.gradle
works well, except that BuildConfig.DEBUG
is also going to be true. This might be a problem if your app relies on BuildConfig.DEBUG
to do something only when it's a debug build.
In such a case, try Log.wtf(BuildConfig.APPLICATION_ID, "something went wrong")
, which will print to logcat even if it's a release build.

- 2,764
- 22
- 22
-
Agree with you. In this case I added a constant in a config class for test and release builds (and didn't rely on `BuildConfig.DEBUG`). For instance `const val TEST = true`. But don't forget to change it's value when publish an application. – CoolMind Jun 17 '21 at 12:10
-