Reputation: 35
I'm new to Parse and I have some problem with the ParseUI-Login and ParseUI-Widget.
After importing ParseLoginUI as a module in my project, I clicked run app button, and the error happened.
I have the exact same problem as Han (Error:Execution failed for task ':app:dexDebug'. when importing ParseLoginUI as a module) however, the solution he was provided doesn't work for me..
I may also mention that I don't know what "clone the project" meant in the instructions, I downloaded the zip and imported the modules to android studio from "my downloads".
Below is my app 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')
}
Below is the 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
}
}
and below is the 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
}
}
Upvotes: 1
Views: 106
Reputation: 11
In your app build.gradle try this:
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'
}
I had a similar problem for ParseUI-Login for my app and this worked for me.
Upvotes: 1