Android – repeat input using parse and multidex

My project is a chat application using Parse. After adding other dependencies, this problem begins to appear:

When searching in stackoverflow, some people told me that it may be the 65K limit of Android. Therefore, to solve the problem, I follow the following steps:

1 – add multidex

DefaultConfig {
         multiDexEnabled true
}

and

compile 'com.android.support:multidex:1.0.0'

https://developer.android.com/tools/building/multidex.html

2 – enable Jumbo mode in Android gradle settings

 dexOptions {
        jumboMode = true
 }

I cleaned up the project and ran the gradle build. It didn't produce any errors. Big! But when I click "run app", it will generate this error below

If I delete the dependency 'com. Parse. Bolts: bolts Android: 1.' running the application 'is valid, but I can't do without Parse's dependency

This is my gradle build script:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "br.com.triangulum.mink"
        minSdkVersion 18
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

    }
    buildTypes {
        release {

            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        jumboMode = true
    }
}
repositories {
    mavenCentral()
}

dependencies {
    compile 'com.parse.bolts:bolts-android:1.+'
    compile('com.android.support:multidex:1.0.0') {
        exclude group: 'com.parse.bolts',
                module: 'bolts-android'
    }
    androidTestCompile 'com.android.support:multidex-instrumentation:1.0.0'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile fileTree(dir: 'libs', include: 'Parse*.jar')
    compile project('libraries:httprequest')
    compile project('libraries:cameralibrary')
    compile project('libraries:bgarefreshlayout')
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.android.support:cardview-v7:+'
    compile 'com.android.support:palette-v7:+'
    compile 'com.android.support:design:+'
    compile 'com.daimajia.swipelayout:library:1.2.0@aar'
    compile 'com.google.android.gms:play-services:6.5.87'
    compile 'com.google.code.gson:gson:2.2.+'
    compile 'com.squareup.picasso:picasso:2.4.0'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.afollestad:material-dialogs:0.7.4.0'
    compile 'com.getbase:floatingactionbutton:1.10.0'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    compile 'de.greenrobot:eventbus:2.4.+'
    compile'com.edmodo:cropper:1.0.+'
    compile 'com.github.ksoichiro:android-observablescrollview:+'
    compile 'com.etsy.android.grid:library:1.0.5'
    compile('com.mikepenz:actionitembadge:3.0.2@aar') {
        transitive = true
    }
    compile 'com.daimajia.swipelayout:library:1.2.0@aar'
    compile 'com.android.support:multidex:1.0.+'
}

resolvent:

Try to change this:

compile('com.android.support:multidex:1.0.0') {
        exclude group: 'com.parse.bolts',
                module: 'bolts-android'
    }

In this regard:

compile('com.android.support:multidex:1.0.0');

Sometimes the bolts module is used to fix duplicated dexlibs

to greet

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>