我想在我的项目中使用 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.
最佳答案
移除
apply from: 'maven-push.gradle'
从您尝试添加的模块的构建 gradle 文件中。 接下来,包括
implementation project(':module_name')
在主项目的构建 gradle 文件的依赖项中。
您尝试添加的模块最初是在 maven 中。由于新模块是本地的,因此您不需要 Maven 代码。
关于java - 无法为类型为 org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer 的对象获取未知属性 'GROUP',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60505888/