建立与Parse的连接

时间:2015-11-06 01:39:31

标签: java android

嘿......我正在尝试连接到Parse.com,但我一遍又一遍地得到同样的错误。

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
  

java.util.zip.ZipException:重复条目:com / parse / AbstractQueryController $ 1.class

我尝试了所有我发现但似乎没有任何帮助的东西。任何帮助将不胜感激。谢谢。

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.kudzai.picabay"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.android.support:multidex:1.+'
    compile 'com.parse:parse-android:1.+'
    compile files('libs/bolts-android-1.2.1.jar')
}

1 个答案:

答案 0 :(得分:0)

试试这个build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.parse'

buildscript {
  repositories {
    mavenCentral()
    maven { url 'https://maven.parse.com/repo' }
  }
  dependencies {
    classpath 'com.parse.tools:gradle:1.+'
  }
}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.kudzai.picabay"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


}

dependencies {
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.android.support:multidex:1.+'

    compile 'com.parse.bolts:bolts-android:1.2.1'
    compile 'com.parse:parse-android:1.10.3'
}