第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

如何將ViewPagerIndicator導(dǎo)入到AndroidStudio中

標(biāo)簽:
Android

Top Level Build.gradle:

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.

使用 maven 导入

1.在最顶层的Build.gradle 中添加如下代码:

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()
 
}
 
}

2.在自己的app’s的build.gradle添加

compile 'com.viewpagerindicator:library:2.4.1@aar'

以后想添加什么第三方的库,只需要在 http://search.maven.org/ 中搜索,然后添加在第2中就行了。

下载好源码,添加已经下载好的源码:

1.下载 source code

2.在你的 Android Studio Project: File -> Project Structure -> add (+ symbol) -> Import Existing Project. k只导入library”文件夹而不是整个工程 (leave the import options as Android Studio suggests).

3.按步骤设置(SDK 版本),然后next

4.在你app的build.gradle中添加依赖 dependencies { compile project ( ':library' ) }

注意:如果你项目中已经存在了support-v4,你需要删除,因为添加的 Android-ViewPagerIndicator 会包含这个库。在一个工程中不能有两个这样的库(工程会共用库中的这个jar)。如果 Android-ViewPagerIndicator Library 中的support-v4 不能满足你的要求,那只能用第2种方法,下载好后,把你要的support-v4替换Library文件夹中的,然后按步骤进行。

原文链接:http://www.apkbus.com/blog-815579-62047.html

點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺得本文不錯(cuò),就分享一下吧!

評(píng)論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評(píng)論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評(píng)論
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊(cè)有機(jī)會(huì)得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會(huì)
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

舉報(bào)

0/150
提交
取消