Android Studio 调试窗口中的“'this' is not available" [英] “'this' is not available” in debug windows of Android Studio

查看:424
本文介绍了Android Studio 调试窗口中的“'this' is not available"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请我真的需要帮助,

这似乎是 'this' 不可用"的副本.在 Android Studio 的调试窗口中

但我需要提供更多信息来解决具体问题.

but I need to provide more information to address the specific issue.

所以我遇到了与链接中问题相同的情况,但我怀疑这与我的构建设置有关.

So I am in the same situation of the question at the link, but I suspect that it has to do with my build setup.

请帮忙.

这是我的build.gradle:

buildscript {
repositories {
    maven { url 'http://download.crashlytics.com/maven' }
    mavenCentral()

}

dependencies {
    classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
    classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
apply plugin: 'com.jakewharton.hugo'

repositories {
maven { url 'http://download.crashlytics.com/maven' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
maven { url 'https://dl.bintray.com/kennyc1012/maven' }
}

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.foo"
    minSdkVersion 16
    targetSdkVersion 21
    versionCode 21
    versionName "4.7"
}

buildTypes {
    debug {
        debuggable true
    }
   }

packagingOptions {
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'LICENSE.txt'
    exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.xml'
    exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.properties'
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
compile('com.squareup.retrofit:converter-simplexml:2.0.0-beta2') {
    exclude module: 'xpp3'
    exclude group: 'stax'
}
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:preference-v7:23.1.1'
compile 'com.android.support:palette-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.octo.android.robospice:robospice-spring-android:1.4.14'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
compile 'com.octo.android.robospice:robospice-ui-spicelist:1.4.14'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'org.jsoup:jsoup:1.7.2'
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.1.0@aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.getbase:floatingactionbutton:1.9.0'
compile 'com.android.support:design:23.1.1'
compile 'joda-time:joda-time:2.9.1'
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.jayway.android.robotium:robotium-solo:5.5.3'
compile 'com.kennyc:multistateview:1.1'
compile 'com.mikepenz:iconics-core:2.5.2@aar'
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1@aar'
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original@aar'
compile 'me.henrytao:smooth-app-bar-layout:1.0.1'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}

这是顶级级别的build.gradle

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
}
}

allprojects {
repositories {
    jcenter()
}
}

推荐答案

我遇到了同样的问题.试试这个方法:让你的 build.gradle have---------> minifyEnabled false.有时我用这种方式解决我的问题.

I meet the same question.Try this method:make your build.gradle have---------> minifyEnabled false. Sometime i use this way resolve my problem.

这篇关于Android Studio 调试窗口中的“'this' is not available"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆