Rafael Nascimento
Rafael Nascimento

Reputation: 715

Breakpoints not working on Android Studio 3.3

After upgrading Android Studio to version 3.3 this week, some breakpoints are not being recognized as valid, and are not stopping the thread.

Am I missing anything?

enter image description here

Upvotes: 21

Views: 7133

Answers (4)

Jack Zeng
Jack Zeng

Reputation: 1

it works for android 4.0.1. there is a button "attach debugger to android process" on top menu bar. click it and select the process. then the debugger will hit the break point.

Upvotes: 0

Jack Zeng
Jack Zeng

Reputation: 1

I got the same problem. The problem is solved by upgrading Android Studio from 3.6.2 to 4.0.0

Upvotes: 0

nhoxbypass
nhoxbypass

Reputation: 10152

The issue is in the build tool chain (gradle, d8/r8). Problem is fixed in Android Studio 3.4 Beta 1 with gradle 3.4.0-beta01.


Or a workaround solution for this issue can be used by locally updating the top-level build.gradle configuration for your project:

buildscript {
    repositories {
        maven {
            url 'http://storage.googleapis.com/r8-releases/raw' // ADD THIS.
        }
    }

    dependencies {
        classpath 'com.android.tools:r8:1.3.55'  // ADD THIS. Must be before the Gradle Plugin for Android.
        classpath 'com.android.tools.build:gradle:3.3'
    } 
}

Once the next point release of Android Gradle Plugins takes place these changes can be removed.


For more information, see: https://issuetracker.google.com/issues/122450679

Upvotes: 4

Rafael Nascimento
Rafael Nascimento

Reputation: 715

Found the answer with the help of @pskink. "If" statements are "invalid" locales for breakpoints. See the checkmarks below:

enter image description here

Upvotes: 7

Related Questions