Error: Variables debug info not available

Asked

Viewed 100 times

2

Whenever I try to "debug" with Android Studio this error appears:

"variables debug info not available".

Code in the Gradle:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
    compileSdkVersion 27
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "br.com.appunivespcurso"
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    //noinspection GradleCompatible
    compile 'com.android.support:support-compat:27.0.0'
    compile 'com.google.firebase:firebase-database:11.4.2'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:27.0.0'
    compile 'com.firebaseui:firebase-ui-database:3.1.0'
    compile 'com.android.support:recyclerview-v7:27.0.0'
    compile 'com.android.support:cardview-v7:27.0.0'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'
repositories {
    mavenCentral()
}
  • Always? If you create a new project now and try to debug gives the same error?

  • Interesting, I didn’t think about it, I tested now with some other project and it worked normally.

  • Are you using the Variant build default? If you have created a new one, you need to put debuggable true explicitly.

  • I don’t know "build Variant"...

  • Take a look at your build.Radle. You will find a part that says buildTypes. Edit the question with what’s there, please.

  • Sorry, I don’t understand, I should put the code that is in buildTypes in the question?

  • Yeah. Must be something like buildTypes { debug { .... } release { ..... } ........ }. You can put the whole build.Radle as well (of the module in question, or all).

  • release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-Rules.pro' } , there should be a debug variant tbm. Debug is done in debug buildType. If you add : debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-Rules.pro' }

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.