Error: (52, 0) Gradle The DSL method was not found: 'compomp ()' when using the Quickblox API

I tried using the Quickblox API in my program by adding maven online dependencies. I am using Android Studio.
When I tried to create my program, it shows the following error:

Error: (52, 0) Gradle The DSL method was not found: `compompile ()` Possible reasons: A version of Gradle that does not contain a method may be used in the Nanny Watch project.
  Open the Gradle Shell File The Gradle plugin may not be in the build file.
  Apply Gradle Plugin

Here is the build.gradle file (Project: NannyWatch2):

// 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.5.0'

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

allprojects {
    repositories {

        jcenter()
    }
}

And here is the build.gradle file (Module: App):

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.user.nannywatch"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    def qbSdkVersion = '2.5'

    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'org.apache.commons:commons-lang3:3.4'
    compile 'net.schmizz:sshj:0.10.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:multidex:1.0.0'
    compile('vc908.stickers:stickerfactory:0.2.2@aar') {
        transitive = true;
    }
    compile 'com.google.android.gms:play-services-gcm:7.5.0'  

// I tried using jar compile, but the method QBPushNotifications cannot be resolved
// Therefore I tried to use the online repository

//    compile files('src/main/java/com/example/user/nannywatch/jars/quickblox-android-sdk-chat-2.4.jar')
//    compile files('src/main/java/com/example/user/nannywatch/jars/quickblox-android-sdk-content-2.4.jar')
//    compile files('src/main/java/com/example/user/nannywatch/jars/quickblox-android-sdk-core-2.4.jar')
//    compile files('src/main/java/com/example/user/nannywatch/jars/quickblox-android-sdk-customobjects-2.4.jar')
//    compile files('src/main/java/com/example/user/nannywatch/jars/quickblox-android-sdk-location-2.4.jar')
//    compile files('src/main/java/com/example/user/nannywatch/jars/quickblox-android-sdk-messages-2.4.jar')
//    compile files('src/main/java/com/example/user/nannywatch/jars/quickblox-android-sdk-videochat-webrtc-2.4.jar')  

    ompile "com.quickblox:quickblox-android-sdk-core:$qbSdkVersion@aar"
    ompile ("com.quickblox:quickblox-android-sdk-chat:$qbSdkVersion@aar"){
        transitive=true
    }
    ompile "com.quickblox:quickblox-android-sdk-content:$qbSdkVersion@aar"
    ompile "com.quickblox:quickblox-android-sdk-messages:$qbSdkVersion@aar"
    ompile "com.quickblox:quickblox-android-sdk-customobjects:$qbSdkVersion@aar"
    ompile "com.quickblox:quickblox-android-sdk-location:$qbSdkVersion@aar"
    ompile "com.quickblox:quickblox-android-sdk-videochat-webrtc:$qbSdkVersion@aar"
}

: "" '(groovy.lang.Closure)'

+4
2

"". Gradle Quickblox, ASCII "c" Gradle "".

  • ASCII- "c", Quickblox, 209 129
  • ASCII- "c" 99

, : ASCII

  • → c
  • Quickblox →

, ASCII.

, , c :)

+7

Gradle.

:

  • 'com.android.tools.build: gradle: 1.3.0' Gradle Android-
  • gradleVersion = '2.4' Gradle

https://github.com/QuickBlox/quickblox-android-sdk/blob/master/build.gradle

0

Source: https://habr.com/ru/post/1628881/


All Articles