【发布时间】:2015-10-29 07:45:37
【问题描述】:
我在 android studio 项目中尝试从 github 导入库时遇到问题。很少有库被成功导入。这是我在android studio项目中导入的方法:
从 github 下载 zip。
提取相应的库。
在android studio项目中导入模块,然后导入库并添加依赖。
这是我在尝试导入链接为:https://github.com/mikepenz/MaterialDrawer 的材料抽屉库时遇到的错误
Error:No such property: GROUP for class: org.gradle.api.publication.maven.internal.ant.DefaultGroovyMavenDeployer
我从 github 导入库的方法正确吗?
这是我的模块 gradle。
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.works.vipul.materialdrawer"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile('com.mikepenz:materialdrawer:3.1.2@aar') {
transitive = true
}
}
【问题讨论】:
-
使用 gradle 而不是手动操作..
-
我正在添加依赖frm gradle并用gradle编译它。我不知道你手动做是什么意思
-
您提到下载 zip 和导入库,您是否在 build.gradle 中尝试过这个 compile('com.mikepenz:materialdrawer:3.1.2@aar') { transitive = true }
-
我确实在依赖项中添加了这个
-
在你的项目依赖中添加库,它会自动添加到模块 gradle 文件中。
标签: android git github android-library