Dex JumboMode

656 views
Skip to first unread message

Ryan Bis

unread,
Oct 8, 2014, 6:50:25 PM10/8/14
to adt...@googlegroups.com
I'm trying to get JumboMode to work, and I seem to be missing something. In Eclipse, it works if I add the option to project.properties. But, I'm just migrated our code over to Android Studio, and it's giving me the method ID not in (65536) error when I try to debug the app.

This is what I have for the android section in the project's build.gradle:

android {
    compileSdkVersion 19
    buildToolsVersion "20.0.0"

    dexOptions {
        jumboMode = true
    }

    defaultConfig {
        applicationId "com.businesstexter.biztexter2"
        minSdkVersion 14
        targetSdkVersion 19

        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
    }

    productFlavors {
        googlePlay {
        }
        amazon {
        }
        gxv3275 {
        }
    }

    buildTypes {
        debug {
            debuggable true
            runProguard false
            proguardFiles 'proguard_debug.cfg'
        }
        release {
            debuggable false
            runProguard true
            proguardFiles 'proguard.cfg'
        }
    }
}


To get it to just build and run for now, I have to enable proguard to strip out extra methods. This seems to cause breakpoints not to function properly (the app never gets suspended at the breakpoints I selected). Plus, I don't want it to have to run proguard when debugging the app. Any ideas on how to get this working?

Thanks,
Ryan

liatsineam

unread,
Oct 8, 2014, 9:05:07 PM10/8/14
to adt...@googlegroups.com
JumboMode cannot solve the method ID not in (65536) error

Ryan Bis

unread,
Oct 9, 2014, 11:22:25 AM10/9/14
to adt...@googlegroups.com
That's odd. Like I said earlier, I DON'T get this problem in Eclipse, when setting jumbo mode to true in project.properties. Must be a gradle thing then?

I've solved it for now by stripping out unused classes from play services in the build.gradle script. It's at least better than running proguard and having breakpoints not work.

Ryan

Ryan Bis

unread,
Oct 20, 2014, 1:14:31 PM10/20/14
to adt...@googlegroups.com
I've been struggling trying to get the builds to be faster, they are much slower than what we saw with Eclipse/Ant. I just can't seem to win with gradle.

So I have an update on this. It seems setting jumboMode = true DOES fix this issue (even without stripping unused play services classes). However, you must delete the build folders in the project, as AS doesn't seem to properly clean the project. Once I deleted the build folders, and rebuilt, it worked fine.

However, if I modify any java file, the build fails with a DexException, saying multiple dex files define file ....

Is this due to me using an incremental build? When I clean and rebuild, the project builds fine. But that defeats the whole purpose of using incremental builds :).

Ryan

Ryan Bis

unread,
Oct 20, 2014, 2:00:58 PM10/20/14
to adt...@googlegroups.com
Ok, so it seems that the issue was incremental being set to true. Is this an issue with jumboMode? It seems to happen only when both of these options are enabled. Is this a bug?

Ryan
Reply all
Reply to author
Forward
0 new messages