【问题标题】:Could not get unknown property 'GROUP' for object of type org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer无法为 org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer 类型的对象获取未知属性“GROUP”
【发布时间】:2020-06-15 18:07:17
【问题描述】:

我想在我的项目中使用 blackfizz/EazeGraph,为此我下载了它并将它作为一个模块导入到我空的“hello world”Android 项目中。我正在使用 android studio v3.5.3 使用 sdk manager v26,这是我的 app/build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.abdsafi.testchartline"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.github.PhilJay:MPAndroidChart:3.1.0'
    implementation 'com.github.blackfizz:eazegraph:1.2.2@aar'
    implementation 'com.nineoldandroids:library:2.4.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

但是当我导入时,我收到了以下错误消息:


FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\HP\Documents\Testchartline\EazeGraphLibrary\gradle_mvn_push.gradle' line: 48

* What went wrong:
A problem occurred configuring project ':EazeGraphLibrary'.
> Could not get unknown property 'GROUP' for object of type org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

CONFIGURE FAILED in 1s
ERROR: Could not get unknown property 'GROUP' for object of type org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer.

【问题讨论】:

    标签: java android kotlin android-library


    【解决方案1】:

    删除

    apply from: 'maven-push.gradle'
    

    来自您尝试添加的模块的构建 gradle 文件。 接下来,包括

    implementation project(':module_name')
    

    在主项目的构建 gradle 文件的依赖项中。

    您尝试添加的模块最初位于 maven 中。由于新模块是本地的,因此您不需要 maven 代码。

    【讨论】:

    • 谢谢。我不得不手动导入一个库。所以我遇到了这个错误,你的解决方案帮助了我。
    • 谢谢,在我从“maven-push.gradle”中删除应用后,它现在可以工作了。
    猜你喜欢
    • 2018-01-31
    • 1970-01-01
    • 1970-01-01
    • 2020-01-02
    • 2020-04-15
    • 2018-11-23
    • 1970-01-01
    • 2021-12-19
    • 2018-09-22
    相关资源
    最近更新 更多