【问题标题】:“'this' is not available” in debug windows of Android StudioAndroid Studio 的调试窗口中的“'this' is not available”
【发布时间】:2016-03-05 16:32:56
【问题描述】:

我真的需要帮助,

这似乎与 "'this' is not available" in debug windows of Android Studio 重复

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

所以我在链接中遇到了同样的问题,但我怀疑它与我的构建设置有关。

请帮忙。


这是我的 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()
}
}

【问题讨论】:

标签: android android-studio android-gradle-plugin android-debug


【解决方案1】:

删除 Hugo,问题就解决了。这个问题是重复的,并且已经在以下帖子中回答:"'this' is not available" in debug windows of Android Studio

一个问题已发布到 Hugo 存储库。

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-29
      • 2022-12-01
      相关资源
      最近更新 更多