1

I'm doing some debugging stuff over my Android app and I need to look what's going on in the internal SDK ObjectInputStream class. I can set a breakpoint where I need, but as soon as I begin debugging, a cross appears telling this line isn't executable. I'm currently working with a device for debugging and, as I'm able to debug other internal Java classes, it seems the given SDK and the one from my device aren't the same, so some class sources match while others don't...

I have already tried rebuilding the project and invalidating cache.

Any idea about that?

enter image description here

EDITED

I tried modifying my build.gradle file in order to match the API version with the one of the device (16). The source code seems now to change, however I can only see the method signature now, no implementation code...

That's my gradle configuration:

android {
    compileSdkVersion 16
    buildToolsVersion "19.1.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 16
    }
    buildTypes {
        release {
            runProguard false
            proguardFile getDefaultProguardFile('proguard-android.txt')
        }
    }
    productFlavors {
        defaultFlavor {
            proguardFile 'proguard-rules.txt'
        }
    }
    packagingOptions {
        exclude 'META-INF/ASL2.0'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }
    sourceSets {


    }
}
Aritz
  • 30,971
  • 16
  • 136
  • 217
  • May be due to a discrepancy in what version of android your device is running vs the target platform you are developing for in android studio. – dcow Aug 11 '14 at 10:08
  • @dcow, I have more than one device for debugging, all of them with different Android versions. Do I have to modify the target SDK to make it match with the version every time I change the device? – Aritz Aug 11 '14 at 10:10
  • Don't know but probably worth a try. Do report back, though. – dcow Aug 11 '14 at 10:11
  • @dcow, [this](http://stackoverflow.com/questions/21221679/android-studio-how-to-attach-android-sdk-sources) seems to be related. Currently, my compile SDK is 19, while the one from my phone is 16. Will leave a reply! – Aritz Aug 11 '14 at 10:20

0 Answers0