如何从github向android studio项目添加第三方库?
我想在我的项目中使用这个库 对于其他git库,我总是发现提供的build-gradle语句要添加到项目中,但这里没有。 有人能帮我吗? 就像我添加到项目中的这些依赖项一样如何从github向android studio项目添加第三方库?,android,git,android-support-library,Android,Git,Android Support Library,我想在我的项目中使用这个库 对于其他git库,我总是发现提供的build-gradle语句要添加到项目中,但这里没有。 有人能帮我吗? 就像我添加到项目中的这些依赖项一样 dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.1.1' compile 'com.github.siyamed:android-
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.github.clans:fab:1.4.0'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'it.neokree:MaterialTabs:0.11'
compile 'it.sephiroth.android.library.floatingmenu:floatingmenu:1.0.1'
compile 'com.github.castorflex.verticalviewpager:library:19.0.1'
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
compile 'com.kbeanie:image-chooser-library:1.4.3@aar'
compile 'org.jraf:android-switch-backport:1.4.0@aar'
compile('com.doomonafireball.betterpickers:library:1.5.5') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile files('libs/easyandroidanimationslibrary-v0.5.jar')
compile 'com.android.support:recyclerview-v7:21.0.3'
compile files('libs/AndroidCountryPicker-master.jar')
}
如果有人能帮助我如何使用相机库,那就太好了。这个库是用Eclipse构建的,不提供渐变支持 这个库也有一些资源,然后您可以使用jar文件 删除
libs/AndroidCountryPicker master.jar
并从build.gradle
中删除此行:
compile files('libs/AndroidCountryPicker-master.jar')
你必须:
- 将此库作为项目中的模块本地克隆。因此,克隆
您的
文件夹中的文件夹根目录/library1
root:
library1
build.gradle
app
build.gradle
settings.gradle
- 在中更改
文件设置.gradle
include':library1' 包括:应用程序“
app/build.gradle
文件中,您必须添加:
dependencies {
// Module Library
compile project(':library1')
}
最后,在库1/build.gradle中,您必须添加如下内容:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
}
}
apply plugin: 'com.android.application'
android {
lintOptions {
abortOnError false
}
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
targetSdkVersion 22
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
编译文件('libs/AndroidCountryPicker master.jar')
这一行看起来正确。你有那个罐子吗?@Blackbelt不,我没有,我已经从链接下载了下载zip文件并复制到我的libs文件夹中。这就是我的全部。我急需这个。请帮帮我。