"'this' is not available" in debug windows of Android Studio

this keyword is references to the current object instance, as in the the official Java documentation.

In your case the error message 'this' is not available means that the debugger cannot access (i.e. does not know) the current object.


Inside Lambda block we can't evaluate the value of variables. Changing from the lambda expression to normal expression solved my issue


when i change my gradle config,the work for me. this is error config:

     buildTypes {
    release {
        minifyEnabled true
        zipAlignEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release
    }

    debug {
        minifyEnabled true
        zipAlignEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release
    }
}

and, this is work for me.

debug {

        minifyEnabled false
        zipAlignEnabled false
        shrinkResources false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.release
    }

I think this is an issue related to Reflexion. My project was using Hugo. As soon as I disable it, the bug disappeared.

Issue has been pushed : https://github.com/JakeWharton/hugo/issues/127