Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Android Studio 2.0, Cannot find local variable of method in debug mode

After Updating the android version 1.5 to 2.0 Preview4. Android studio Debugger unable to find the local variable defined in method definition. For reference, find the below screenshot.

enter image description here

like image 950
MANISH PATHAK Avatar asked Oct 08 '22 04:10

MANISH PATHAK


People also ask

What is debug mode in Android Studio?

Android Studio indicates the line of code that your app executes just before triggering a watchpoint View and change resource value display format. In debug mode, you can view resource values and select a different display format for variables in your Java code. With the Variables tab displayed and a frame selected, do the following:

How do I debug my native code in Android Studio?

If you add C and C++ code to your project , Android Studio also runs the LLDB debugger in the Debug window to debug your native code. If the Debug window is not open, select View > Tool Windows > Debug (or click Debug in the tool window bar), and then click the Debugger tab, as shown in figure 1.

How do I view variable values in debug mode?

In debug mode, you can view resource values and select a different display format for variables in your Java code. With the Variables tab displayed and a frame selected, do the following: In the Variables list, right-click anywhere on a resource line to display the drop-down list.

How do I debug my Android app?

Debug your app 1 Enable debugging. If you're using the emulator, this is enabled by default. ... 2 Start debugging. Set some breakpoints in the app code. ... 3 Change the debugger type. ... 4 Use the system log. ... 5 Work with breakpoints. ... 6 Inspect variables. ... 7 View and change resource value display format. ...


Video Answer


1 Answers

In your gradle, do you enable test coverage ?

    buildTypes {
        debug {
            testCoverageEnabled = true
        }
    }

Set testCoverageEnabled = false , it fixed the issue. https://code.google.com/p/android/issues/detail?id=78045

like image 112
Raymond Chenon Avatar answered Nov 07 '22 17:11

Raymond Chenon