导入github ViewPagerIndicator 项目到 android studio
2015-04-16 10:33
330 查看
Top Level Build.gradle:
App's build.gradle:
To use Android-ViewPagerIndicator in Android Studio, you can’t download it from gradle. Instead, you must import the library as an “Existing Project” to your current one.
Follow these steps:
1 Download source code from GitHub.
2 In your Android Studio Project: File -> Project Structure -> add (+ symbol) -> Import Existing Project. Import just the folder called ”library”, not the entire project (leave the import options as Android Studio suggests).
3 If the “compileSdkVersion” specified in your build.gradle doesn’t match with the one specified in the Android-ViewPagerIndicator project, change the second one. The same apply with any other property, such as “minSdkVersion” or even the current support library.
4 Add Android-ViewPagerIndicator project as a dependency to your build.gradle module:
5 Sync project with gradle files.
buildscript { repositories { maven { url "http://dl.bintray.com/populov/maven" } mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.12.+' } } allprojects { repositories { maven { url "http://dl.bintray.com/populov/maven" } mavenCentral() } }
App's build.gradle:
compile 'com.viewpagerindicator:library:2.4.1@aar'
To use Android-ViewPagerIndicator in Android Studio, you can’t download it from gradle. Instead, you must import the library as an “Existing Project” to your current one.
Follow these steps:
1 Download source code from GitHub.
2 In your Android Studio Project: File -> Project Structure -> add (+ symbol) -> Import Existing Project. Import just the folder called ”library”, not the entire project (leave the import options as Android Studio suggests).
3 If the “compileSdkVersion” specified in your build.gradle doesn’t match with the one specified in the Android-ViewPagerIndicator project, change the second one. The same apply with any other property, such as “minSdkVersion” or even the current support library.
直接将App's build.gradle里面的android{}内容复制到新导入的模块的build.gradle中
4 Add Android-ViewPagerIndicator project as a dependency to your build.gradle module:
dependencies { compile project(':library') }
5 Sync project with gradle files.
相关文章推荐
- ViewPagerIndicator导入Android Studio的方法
- android studio 1.3 导入 viewpagerIndicator
- android studio中导入viewpagerindicator开源库的方法
- Android实战之 自定义GitHub开源项目ViewPagerIndicator
- android studio 1.3 导入 viewpagerIndicator
- Android Studio 导入ViewpagerIndicator
- 第三方库文件ViewPagerIndicator实现由Eclipse到Android Studio的完美迁移——项目迁移一
- Android Studio导入基于Eclipse的第三方库(ViewPagerIndicator)
- Android Studio导入viewpagerindicator
- android studio 项目引入viewpagerindicator开源控件
- android studio 怎样导入 ViewPagerIndicator
- GitHub上找到一个ViewPager项目,导入AndroidStudio一直报错Cause: org/gradle/api/publication/maven/internal/DefaultMa
- Android Studio导入第三方包(资源)方法,ViewPager+TabLayout的使用,ViewPager单独使用实现无限循环
- 如何将ViewPagerIndicator导入到AndroidStudio中
- 关于Android Studio项目上传Github以及导入GitHub项目到AndroidStudio
- 【Android Studio】AS 使用记录01(导入GitHub项目)
- Android项目Tab类型主界面大总结 Fragment+TabPageIndicator+ViewPager
- Android项目Tab类型主界面大总结 Fragment+TabPageIndicator+ViewPager
- ViewPagerIndicator+viewpager的简单使用,不需要导入Library包
- 开源项目源码解析-ViewPagerindicator 源码解析