Skip to content

Cannot debug app #2

@DrifterAtSea

Description

@DrifterAtSea

If I put a breakpoint on this line in the HomeActivity.kt module:

homeFragment = supportFragmentManager.findFragmentById(R.id.frame_layout_content) as HomeFragment? ?: HomeFragment.newInstance().also {

the breakpoint will be hit. But if I then attempt to step over the line, the app hangs. If even I hit Continue, it hangs. The app hangs even with no breakpoints. The app does not hang if you just run it without debugging.

I'm using Android Studio 3.2.1

Top level gradle.build:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.2.51'
    ext.supportVersion = '26.0.0'
    ext.retrofitVersion = '2.3.0'
    ext.glideVersion = '3.7.0'
    ext.exoPlayerVersion = 'r2.4.4'
    ext.daggerVersion = '2.7'

    repositories {
        maven { url 'https://maven.google.com' }
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url 'https://maven.google.com' }
        jcenter()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

App level gradle.build:

//noinspection GradleCompatible
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 26
    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "com.example.github.videoapp"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        buildConfigField("String", "API_KEY", API_KEY)
        buildConfigField("String", "BASE_URL", BASE_URL)
        buildConfigField("String", "IMG_BASE_URL", IMG_BASE_URL)
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:support-v4:26.0.0'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

    implementation "com.android.support:appcompat-v7:$supportVersion"
    implementation "com.android.support:design:$supportVersion"
    implementation "com.android.support:support-v13:$supportVersion"
    implementation "com.android.support:recyclerview-v7:$supportVersion"
    implementation "com.android.support:support-annotations:$supportVersion"
    implementation "com.android.support:cardview-v7:$supportVersion"

    testImplementation 'junit:junit:4.12'

    implementation 'com.android.support.constraint:constraint-layout:1.0.2'

    implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
    implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"

    implementation "com.github.bumptech.glide:glide:$glideVersion"

    //Dagger 2 dependencies
    implementation "com.google.dagger:dagger:$daggerVersion"
    kapt "com.google.dagger:dagger-compiler:$daggerVersion"
    compileOnly 'org.glassfish:javax.annotation:10.0-b28'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions