0

When I run debugger, some files (but not all files) the line that is highlighted is not actually the line being run. This makes debugging a bit confusing. I'd be ok if it always happened or never happened but with this happening sometimes and not other times, it's really hard to find the bug. about android studio version example debugger You can see above that the line highlighted is in newArray(...) but given the variable details at the bottom, it is clearly running in the middle of public static Parcel obtain().

This seems to only happen to files that I have not made like Parcel.java, but not all the time. Also, you can see in the example that there is red which marks error. This also happens when the app runs without error so I don't know why those appear. That's probably a separate question though.

And my gradle:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.mattermost.mattermost"
        minSdkVersion 19

        /* If you want to change targetSdkVersion to higher version, please make sure you
         * convert application icon to meet desired lollipop guidelines, that is icon should be
         * flat and white*/
        targetSdkVersion 23
        versionCode 306
        versionName "3.0.6"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
    }
}
CookieMonster
  • 492
  • 6
  • 18

1 Answers1

0

Did you attach the correct sources to you environment? I can see that you are using the sources of android-23 (Android 6.0), is that what your target device is running?

Friesgaard
  • 2,975
  • 2
  • 17
  • 13
  • Added my gradle file, I am running on a physical devce with android version 4.4.2 and api 19. Shouldn't it be able to run on any device with api 19-23? – CookieMonster Sep 08 '16 at 13:24
  • Well the soures are a view of what is being executed. You should download sources for android-19 and attach those instead in your debug environment, then I think the lines would match. – Friesgaard Sep 08 '16 at 13:34
  • Are you talking about when I open the SDK manager? I have SDK Platforms from 4.1 to 6.0 all downloaded. – CookieMonster Sep 08 '16 at 13:35
  • No, I'm talking about the sources you have setup in Android Studio. They are setup to android-23. Look at this link how to change to point at the right sources http://stackoverflow.com/a/36903786/626741 – Friesgaard Sep 16 '16 at 11:27