我是 Parse 的新手,我在使用 ParseUI-Login 和 ParseUI-Widget 时遇到了一些问题。
在我的项目中将 ParseLoginUI 作为模块导入后,我单击运行应用程序按钮,然后发生了错误。
我和 Han ( Error:Execution failed for task ':app:dexDebug'. when importing ParseLoginUI as a module ) 有完全相同的问题,但是,他提供的解决方案对我不起作用..
我可能还会提到我不知道说明中的“克隆项目”是什么意思,我下载了 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
}
}
最佳答案
在您的应用程序 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 遇到了类似的问题,这对我有用。
关于android - 错误 :Execution failed for task ':app:dexDebug' when importing ParseUI-widget and Login as modules,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33110928/