Error:No such property: GROUP for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer
Asked Answered
A

5

116

I want to use RecyclerViewLib in my project and for that I downloaded it and imported it as a module to my empty "hello world" Android project. I am using android studio v1.0.1 using sdk manager v24 and this is my app/build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 17
buildToolsVersion "19.1.0"

defaultConfig {
    applicationId "com.example.mk.dragdrop4"
    minSdkVersion 14
    targetSdkVersion 17
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}

and this is my library/build.gradle

apply plugin: 'com.android.library'

android {
    compileSdkVersion 17
    buildToolsVersion "19.1.0"

    defaultConfig {

        minSdkVersion 7
        targetSdkVersion 17
        versionCode 1
        versionName "1.0"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:20.0.0'
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

apply from: 'https://raw.github.com/twotoasters/gradle-mvn-push/master/gradle-mvn-push.gradle'

But when I import that I'm getting this error message:

 Error:No such property: GROUP for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer 

Can anyone help me about this problem?

Aquavit answered 11/2, 2015 at 9:18 Comment(0)
P
284

Remove this line from the build.gradle on the specified project

apply from: 'https://raw.github.com/twotoasters/gradle-mvn-push/master/gradle-mvn-push.gradle'
Phira answered 11/2, 2015 at 9:23 Comment(2)
hi @goonerdroid that's work thank you. but can you explain more about this line and what exactly do ?Aquavit
library has gradle tasks for uploading to the Maven repository that require some properties to be set for the gradle environment, in your project you don't need/want that.Phira
P
47

I have experienced a very similar problem.

I tried to include the QuickReturn feature into my app : https://github.com/felipecsl/QuickReturn

I'm using Android Studios 1.0 and after I imported the library into my project, it gives me the same error. I then looked at the build.gradle file for the library and removed this line and it worked:

apply from: 'gradle-mvn-push.gradle'
Pompous answered 21/3, 2015 at 18:56 Comment(2)
The project or the module that you just imported. It has a gradle file too. This line can be found in that gradle file. Just follow @Simon's advice and you are good to go. Thanx simon.Wojak
Is this the only solution?Whiffletree
E
14

Similar issue.

Removed line:

apply from: 'maven-push.gradle'

from build.gradle and was able to sync successfully.

Erose answered 16/9, 2016 at 5:40 Comment(2)
Doing this worked for me. What are the consequences of not having this statement?Collide
I don't see this line in any of my build.gradle files. What should I do?Flesh
T
2

check library and project build.gradle and comment this line if you found

apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

Tanny answered 26/12, 2016 at 6:55 Comment(0)
S
0
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'  // include latest gradle version and if project build with older version can update or can user same version

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

allprojects {
    repositories {
        mavenCentral()
    }
}
Sarcoma answered 15/1, 2017 at 2:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.