日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

gradle 查看依赖类库版本_Android studio中查看依赖的第三方库的历史版本和最新版本...

發布時間:2025/3/8 Android 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 gradle 查看依赖类库版本_Android studio中查看依赖的第三方库的历史版本和最新版本... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在日常開發過程中,我們通過會依賴很多的第三方庫項目。類似這樣:

dependencies {

compile 'com.android.support:support-v4:24.2.1'

compile 'com.google.code.gson:gson:2.4'

compile 'com.lzy.net:okhttputils:1.7.0'

compile 'com.github.ybq:Android-SpinKit:1.1.0'

compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'

compile 'me.grantland:autofittextview:0.2.1'

compile 'de.hdodenhof:circleimageview:2.1.0'

}

我時常有個疑惑,我依賴的這些第三方庫項目,都發布哪些版本,最新版本是什么呢? 經過一番google后,我找到了查看這些版本的方式! 很簡單!

第一步:進入studio的setting>plugins 然后 安裝Depencencies Version Checker這個插件。

521747a8-abe7-411d-982b-6a4f0527e0d0.png

第二步:重啟studio后,就可以看到VersionChecker這個tab

微信截圖_20170712110714.png

第三步:輸入你的build.gradle腳本到VersionChecker窗口左側輸入欄中。

輸入的腳本為:根build.gradle腳本的下面這個部分:

buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:2.3.3'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

}

}

然后加上,你想檢查的module的全部build.gradle的內容。 然后點擊VersionCheck按鈕。就可以在右側看到依賴庫的發版的版本和最新版本了。

微信截圖_20170712111203.png

以com.google.code.gson:gson第三方庫為例:我們可以看到使用版本為2.4, 最新版本為2.8.1。 點擊右側的藍色庫的鏈接,就可以看到該庫發布的歷史版本了。

例:

微信截圖_20170712111512.png

最后付上完整的VersionChecker的輸入腳本,以便大家對照!

buildscript {

repositories {

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:2.3.3'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

}

}

apply plugin: 'com.android.application'

android {

compileSdkVersion 22

buildToolsVersion '25.0.0'

defaultConfig {

applicationId "com.zhy.sample_okhttp"

minSdkVersion 10

targetSdkVersion 22

versionCode 1

versionName "1.0"

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

lintOptions{

abortOnError false

}

}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.android.support:appcompat-v7:22.2.1'

compile project(':okhttputils')

// compile 'com.zhy:okhttputils:2.6.1'

compile 'com.google.code.gson:gson:2.3.1'

compile 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0'

compile 'com.github.franmontiel:PersistentCookieJar:v0.9.3'

}

最后有一個疑問VersionChecker這個插件可以看到一些第三方的庫的歷史版本和最新版本。但是看不到android support libiary的歷史版本和最新版本。 有人知道查看android support libiary的方式的話,請指點一下我。 感謝!!

總結

以上是生活随笔為你收集整理的gradle 查看依赖类库版本_Android studio中查看依赖的第三方库的历史版本和最新版本...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。