1

我是 Parse 的新手,我对 ParseUI-Login 和 ParseUI-Widget 有一些问题。

在我的项目中将 ParseLoginUI 作为模块导入后,我单击了运行应用程序按钮,并且发生了错误。

我有与 Han 完全相同的问题(错误:任务':app:dexDebug'的执行失败。将 ParseLoginUI 作为模块导入时)但是,他提供的解决方案对我不起作用..

我还可能会提到我不知道说明中的“克隆项目”是什么意思,我下载了 zip 并将模块从“我的下载”导入到 android studio。

下面是我的应用程序 build.gradle

apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.joakim.parsetest"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], exclude: 'android-support-v4.jar',dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile project(':ParseUI-Login')
    compile project(':ParseUI-Widget')
}

下面是 ParseUI-Login build.gradle

apply plugin: 'android-library'

dependencies {
    compile 'com.android.support:support-v4:22.0.0'
    compile 'com.parse:parse-android:1.10.1'

    provided 'com.facebook.android:facebook-android-sdk:4.0.1'
    provided files("$rootProject.projectDir/ParseUI-Login/libs/ParseFacebookUtilsV4-1.10.1.jar")
    provided files("$rootProject.projectDir/ParseUI-Login/libs/ParseTwitterUtils-1.10.1.jar")
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
    }
}

下面是 ParseUI-widget build.gradle

apply plugin: 'com.android.library'

dependencies {
    compile 'com.parse:parse-android:1.10.1'

    androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
    androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
    androidTestCompile 'org.mockito:mockito-core:1.10.19'
    androidTestCompile 'org.skyscreamer:jsonassert:1.2.3'
}

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
    }
}
4

1 回答 1

1

在您的应用程序 build.gradle 中尝试以下操作:

dependencies {
    compile fileTree(include: ['*.jar'], exclude: 'android-support-v4.jar',dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.parse.bolts:bolts-android:1.1.4'
    compile 'com.parse:parseui-login-android:0.0.1' 
}

我的应用程序的 ParseUI-Login 遇到了类似的问题,这对我有用。

于 2015-11-16T04:17:58.113 回答