我是Parse的新手,我在ParseUI登录和ParseUI小部件方面遇到了一些问题。
在将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登录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登录遇到了类似的问题,这对我有用。