新的意外顶级例外。再次在SOF中。

时间:2015-03-03 14:45:00

标签: android android-studio

我的Android Studio中有一个错误。我在stackOverFlow中搜索这个问题,但没有找到答案。

请帮助,因为我不知道如何解决这个问题。

这是我的 gradle 文件:

    buildscript {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0-rc4'
        //classpath 'com.android.tools.build:gradle:1.+'
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'android'
apply plugin: 'io.fabric'

repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
}

android {
    compileSdkVersion 19
    buildToolsVersion '19.1.0'
    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 19
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile project(':facebookSDK')
    compile project(':vksdk_library')
    compile project(':easyFousquareActivity')
    compile project(':pullToRefresh')
    compile project(':volley')   
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.android.support:support-v4:20.+'     
    compile 'com.google.android.gms:play-services:6.5.+' 
    compile 'com.nineoldandroids:library:2.4.0+'
    compile 'com.squareup.picasso:picasso:2.3.2'
    compile 'com.daimajia.slider:library:1.0.9@aar'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
    compile files('libs/commons-codec-1.9.jar')
    compile files('libs/signpost-commonshttp-1.2.1.1.jar')
    compile files('libs/signpost-core-1.2.1.2.jar')
    compile files('libs/libGoogleAnalytics.jar')
    compile files('libs/libGoogleAnalyticsServices.jar')
    compile group: 'org.apache.httpcomponents', name: 'httpclient-android', version: '4.3.5'
    compile 'org.apache.httpcomponents:httpmime:4.3.5'
    compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {
        transitive = true;
    }
    compile('com.twitter.sdk.android:twitter-core:1.0.0@aar') {
        transitive = true;
    }
    compile('com.mopub.sdk.android:mopub:3.3.0@aar') {
        transitive = true;
    }
}

这是我的错误输出:

    Error:Execution failed for task ':driverNotes:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    D:\adt-bundle-windows-x86_64-20140702\sdk\build-tools\19.1.0\dx.bat --dex --no-optimize --output 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\dex\debug 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\classes\debug 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\support-annotations-21.0.0-b76b65b1fe9276422260c698604a040d15a30153.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\signpost-commonshttp-1.2.1.1-641257b3c31db915e3858b4266dcc3a6153e50e1.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-5d4d17a5fa716e01b145ebcb54c0228ceac1da8b.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-5317bdb698be495a48d23b90f8231307f37f8726.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\httpmime-4.3.5-56919f65c3584d0b98a7e247552b9427eac0cbaa.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\signpost-core-1.2.1.2-9b230f95742f31cfb79e3303773f76639b28b354.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-3fc943c5785dbc91d555ed02c7c8252152bc6f52.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-e13865fc62be229a69c66fb1d81901e8ebd98615.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\foursquare-api-1.0.2-1f909ec752123e1158d9e956253859c675f4453f.jar
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-dc28c85505292d80b395127e9824768e432d0320.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\retrofit-1.6.1-3bf1c4b59241cccd941e439573b05ed91c4886dc.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\picasso-2.3.2-62e14047ad0695f009395914b496e7279ce782ac.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-be9a9f6a36233e384e74ff6672300938f36504f1.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\library-2.4.0-590a4e742b44e83fca3a0546ede5ec930023d5d0.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-591e5bd87c9a4456dc0869ca767dac735a07d14b.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-0f4ba61c083440e56391b356482ca5ced85b325c.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\universal-image-loader-1.9.3-50b9178bd6cee57d6177abde857149aa90afc906.jar
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\gson-2.2.4-adee139b6e2670ab4f82fcecbc540d430e77ee0b.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\internal_impl-21.0.0-98e60b91b24856e48c7058957c93f80e7c732681.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-aaec04739d32fd1af790afae9881d469b942e1d3.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-4226fb5d059d904711751f62a1f1941541c196a7.jar
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-8a8fb9046b2cc29b2e69e8e1dd15187709842d8a.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\libGoogleAnalyticsServices-17df1f02116ba584bfcb670f0e5ea92e5871fd38.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\commons-codec-1.9-198008a46436afd389140080f2156973ae8c0503.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-23979b468ac8776e64ad0cd0d099c32459dc5cab.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\httpclient-android-4.3.5-1425ca5477b96fdbb1651eda36856e9713d7ab07.jar
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-45fb16ea6b71d11dbdedbb35027c9c2305f5eb2c.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-ca7e29e37e4059f857d27716965b311d65f95f67.jar 
    D:\Users\Noname\work\drivernotes-android\driverNotes\build\intermediates\pre-dexed\debug\classes-2da44f5dc5c49b53278ec88648efc52e17a55c67.jar

Error Code:
    2
Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Cannot merge new index 65550 into a non-jumbo instruction!
        at com.android.dx.merge.InstructionTransformer.jumboCheck(InstructionTransformer.java:108)
        at com.android.dx.merge.InstructionTransformer.access$800(InstructionTransformer.java:25)
        at com.android.dx.merge.InstructionTransformer$StringVisitor.visit(InstructionTransformer.java:71)
        at com.android.dx.io.CodeReader.callVisit(CodeReader.java:114)
        at com.android.dx.io.CodeReader.visitAll(CodeReader.java:89)
        at com.android.dx.merge.InstructionTransformer.transform(InstructionTransformer.java:48)
        at com.android.dx.merge.DexMerger.transformCode(DexMerger.java:840)
        at com.android.dx.merge.DexMerger.transformMethods(DexMerger.java:811)
        at com.android.dx.merge.DexMerger.transformClassData(DexMerger.java:784)
        at com.android.dx.merge.DexMerger.transformClassDef(DexMerger.java:680)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:540)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
        at com.android.dx.command.dexer.Main.run(Main.java:230)
        at com.android.dx.command.dexer.Main.main(Main.java:199)
        at com.android.dx.command.Main.main(Main.java:103)

1 个答案:

答案 0 :(得分:2)

从这一行:

com.android.dex.DexException: Cannot merge new index 65550 into a non-jumbo instruction!

您可能遇到错误消息,表明您的应用有超过65K的方法。然后,您必须在gradle文件中将multiDexEnabled属性设置为true

multiDexEnabled true

更多信息here