1

I'm trying to add the Parse UI widget by following the guide on https://github.com/ParsePlatform/ParseUI-Android. However, when I do that, I get an error that my project may be using a version of Gradle that does not contain the method and that the build file might be missing the Gradle plugin.

This is my Gradle module:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

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

dependencies {
    compile 'com.parse.bolts:bolts-android:1.+'
    compile fileTree(dir: 'libs', include: 'Parse-*jar')
}


// Module dependency on ParseUI libraries sources
compile project(':ParseUI-Widget')

// Uncomment if using Facebook Login (optional Maven dependency)
// compile 'com.facebook.android:facebook-android-sdk:4.0.1'
// compile files('YOUR_PROJECT_LIBS_PATH/ParseFacebookUtilsV4-1.10.0.jar')

and this is my build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

}

allprojects {
    repositories {
        jcenter()
    }
}

Anybody know what I need to add or erase to get it working? I tried answers to similar questions, but so far nothing worked..

I'm not sure if it mattered that I downloaded the ZIP instead of cloning the repository?

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
Yockie
  • 35
  • 7

1 Answers1

0

You have to move this line inside the dependencies block:

compile project(':ParseUI-Widget')

It should be:

dependencies {
    compile 'com.parse.bolts:bolts-android:1.+'
    compile fileTree(dir: 'libs', include: 'Parse-*jar')

    // Module dependency on ParseUI libraries sources
    compile project(':ParseUI-Widget')
}
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841