App依赖查看及升级

依赖项类型

apply plugin: 'com.android.application'
android { ... }
dependencies { 
    // Dependency on a local library module      本地库模块依赖项
    implementation project(":mylibrary")
   
    // Dependency on local binaries              本地二进制文件依赖项
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    // Dependency on a remote binary             远程二进制文件依赖项
    implementation 'com.example.android:app-magic:12.3'
}

依赖升级

项目通常会统一版本,采用第一行的方式添加依赖,就不会向第二行这样提示你升级(第二行你代码你只需要放上去Alt+Enter就可以选择更新版本号了)

这两种依赖你都可以在‘Project Structure’中 修改版本,如下波浪线提示很明显:

依赖查看

先推荐一篇好文章Android 查看项目依赖树的四种方式

1.项目根目录 - 查看重复依赖

全局搜索'1.0.1',然后修改版本即可

2.命令行 - 查看依赖关系

android studio 4.+已经不再需要命令行查看了,在该讲解后展示!

 ./gradlew :app:dependencies 

也可以启动Gradle task,层级如下,记得是app的,不要选(root),root的‘help/dependencies’,可以用来排查依赖问题:

运行结果

先说说依赖后面有(),代表什么意思(命令行中也有提示的)

 +--- com.android.support:drawerlayout:28.0.0
|    |    |         |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |         |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |         |    |    \--- com.android.support:customview:28.0.0 (*)
(c) - dependency constraint
(*) - dependencies omitted (listed previously)
(n) - Not resolved (configuration is not meant to be resolved)

(c) -依赖限制
(*) -省略依赖项(先前列出)
(n) -未解析(配置不意味着要解析)

->  -On the left side of -> is the requested version, on the right the version that will be picked. Here similar question can be found.(左侧是请求的版本,右侧是将被选中的版本)
(*) It means that elsewhere in the report, the dependency was already presented with the whole subdependencies, hence here it's root only. (这意味着在报告的其他地方,依赖关系已经呈现出整个子依赖关系,因此它只是根源)

官方虽给了解释,但是简短我没能理解 于是google了一下才得到两行英文解释  连接

项目中的module有多渠道,及构建方式,输出结果会把所有三个参数组合起来,分别列出来,module中的module也会列出来(通常依赖内容受 随渠道,构建方式影响不大,我说了通常)。如果项目中有传递依赖,我们只需要找到App的信息就好,所有的依赖就会列出来了,大致如下(渠道:bd,构建方式:Debug,记得要看运行时依赖(Runtime classpath of compilation 'bdDebug')):

bdDebugRuntimeClasspath - Runtime classpath of compilation 'bdDebug' (target  (androidJvm)).
+--- project :bus-common
|    +--- project :libcommon
|    |    +--- io.realm:realm-android-library:5.8.0
|    |    |    +--- com.google.code.findbugs:jsr305:3.0.2
|    |    |    +--- com.getkeepsafe.relinker:relinker:1.3.0
|    |    |    \--- io.realm:realm-annotations:5.8.0
|    |    +--- io.realm:realm-android-kotlin-extensions:5.8.0
|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.50 -> 1.3.41
|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.41
|    |    |              +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.41
|    |    |              \--- org.jetbrains:annotations:13.0
|    |    +--- io.realm:realm-annotations:5.8.0
|    |    +--- project :oss-android-sdk
|    |    |    +--- com.squareup.okhttp3:okhttp:3.12.0
|    |    |    |    \--- com.squareup.okio:okio:1.15.0
|    |    |    \--- org.jacoco:org.jacoco.agent:0.7.9
|    |    +--- project :mp3recorder
|    |    +--- com.android.support:support-v4:28.0.0
|    |    |    +--- com.android.support:support-compat:28.0.0
|    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    +--- com.android.support:collections:28.0.0
|    |    |    |    |    \--- com.android.support:support-annotations:28.0.0
|    |    |    |    +--- android.arch.lifecycle:runtime:1.1.1
|    |    |    |    |    +--- android.arch.lifecycle:common:1.1.1
|    |    |    |    |    |    \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
|    |    |    |    |    +--- android.arch.core:common:1.1.1
|    |    |    |    |    |    \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
|    |    |    |    |    \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
|    |    |    |    \--- com.android.support:versionedparcelable:28.0.0
|    |    |    |         +--- com.android.support:support-annotations:28.0.0
|    |    |    |         \--- com.android.support:collections:28.0.0 (*)
|    |    |    +--- com.android.support:support-media-compat:28.0.0
|    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    \--- com.android.support:versionedparcelable:28.0.0 (*)
|    |    |    +--- com.android.support:support-core-utils:28.0.0
|    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    +--- com.android.support:documentfile:28.0.0
|    |    |    |    |    \--- com.android.support:support-annotations:28.0.0
|    |    |    |    +--- com.android.support:loader:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    |    +--- android.arch.lifecycle:livedata:1.1.1
|    |    |    |    |    |    +--- android.arch.core:runtime:1.1.1
|    |    |    |    |    |    |    +--- com.android.support:support-annotations:26.1.0 -> 28.0.0
|    |    |    |    |    |    |    \--- android.arch.core:common:1.1.1 (*)
|    |    |    |    |    |    +--- android.arch.lifecycle:livedata-core:1.1.1
|    |    |    |    |    |    |    +--- android.arch.lifecycle:common:1.1.1 (*)
|    |    |    |    |    |    |    +--- android.arch.core:common:1.1.1 (*)
|    |    |    |    |    |    |    \--- android.arch.core:runtime:1.1.1 (*)
|    |    |    |    |    |    \--- android.arch.core:common:1.1.1 (*)
|    |    |    |    |    \--- android.arch.lifecycle:viewmodel:1.1.1
|    |    |    |    |         \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
|    |    |    |    +--- com.android.support:localbroadcastmanager:28.0.0
|    |    |    |    |    \--- com.android.support:support-annotations:28.0.0
|    |    |    |    \--- com.android.support:print:28.0.0
|    |    |    |         \--- com.android.support:support-annotations:28.0.0
|    |    |    +--- com.android.support:support-core-ui:28.0.0
|    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    +--- com.android.support:support-core-utils:28.0.0 (*)
|    |    |    |    +--- com.android.support:customview:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    \--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    +--- com.android.support:viewpager:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    |    \--- com.android.support:customview:28.0.0 (*)
|    |    |    |    +--- com.android.support:coordinatorlayout:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    |    \--- com.android.support:customview:28.0.0 (*)
|    |    |    |    +--- com.android.support:drawerlayout:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    |    \--- com.android.support:customview:28.0.0 (*)
|    |    |    |    +--- com.android.support:slidingpanelayout:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    |    \--- com.android.support:customview:28.0.0 (*)
|    |    |    |    +--- com.android.support:interpolator:28.0.0
|    |    |    |    |    \--- com.android.support:support-annotations:28.0.0
|    |    |    |    +--- com.android.support:swiperefreshlayout:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    |    \--- com.android.support:interpolator:28.0.0 (*)
|    |    |    |    +--- com.android.support:asynclayoutinflater:28.0.0
|    |    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    |    \--- com.android.support:support-compat:28.0.0 (*)
|    |    |    |    \--- com.android.support:cursoradapter:28.0.0
|    |    |    |         \--- com.android.support:support-annotations:28.0.0
|    |    |    \--- com.android.support:support-fragment:28.0.0
|    |    |         +--- com.android.support:support-compat:28.0.0 (*)
|    |    |         +--- com.android.support:support-core-ui:28.0.0 (*)
|    |    |         +--- com.android.support:support-core-utils:28.0.0 (*)
|    |    |         +--- com.android.support:support-annotations:28.0.0
|    |    |         +--- com.android.support:loader:28.0.0 (*)
|    |    |         \--- android.arch.lifecycle:viewmodel:1.1.1 (*)
|    |    +--- com.android.support:appcompat-v7:28.0.0
|    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    +--- com.android.support:collections:28.0.0 (*)
|    |    |    +--- com.android.support:cursoradapter:28.0.0 (*)
|    |    |    +--- com.android.support:support-core-utils:28.0.0 (*)
|    |    |    +--- com.android.support:support-fragment:28.0.0 (*)
|    |    |    +--- com.android.support:support-vector-drawable:28.0.0
|    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    \--- com.android.support:support-compat:28.0.0 (*)
|    |    |    \--- com.android.support:animated-vector-drawable:28.0.0
|    |    |         +--- com.android.support:support-vector-drawable:28.0.0 (*)
|    |    |         \--- com.android.support:support-core-ui:28.0.0 (*)
|    |    +--- com.android.support:design:28.0.0
|    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    +--- com.android.support:support-compat:28.0.0 (*)
|    |    |    +--- com.android.support:support-core-ui:28.0.0 (*)
|    |    |    +--- com.android.support:support-core-utils:28.0.0 (*)
|    |    |    +--- com.android.support:support-fragment:28.0.0 (*)
|    |    |    +--- com.android.support:transition:28.0.0
|    |    |    |    +--- com.android.support:support-annotations:28.0.0
|    |    |    |    \--- com.android.support:support-compat:28.0.0 (*)
|    |    |    +--- com.android.support:appcompat-v7:28.0.0 (*)
|    |    |    +--- com.android.support:cardview-v7:28.0.0
|    |    |    |    \--- com.android.support:support-annotations:28.0.0
|    |    |    \--- com.android.support:recyclerview-v7:28.0.0
|    |    |         +--- com.android.support:support-annotations:28.0.0
|    |    |         +--- com.android.support:support-compat:28.0.0 (*)
|    |    |         \--- com.android.support:support-core-ui:28.0.0 (*)
|    |    +--- io.reactivex.rxjava2:rxjava:2.2.9
|    |    |    \--- org.reactivestreams:reactive-streams:1.0.2
|    |    +--- io.reactivex.rxjava2:rxandroid:2.1.1
|    |    |    \--- io.reactivex.rxjava2:rxjava:2.2.6 -> 2.2.9 (*)
|    |    +--- com.tbruyelle.rxpermissions2:rxpermissions:0.9.5
|    |    +--- me.yokeyword:fragmentation:1.3.6
|    |    |    \--- me.yokeyword:fragmentation-core:1.3.6
|    |    +--- com.orhanobut:logger:2.2.0
|    |    |    \--- com.android.support:support-annotations:27.1.0 -> 28.0.0
|    |    +--- com.google.code.gson:gson:2.8.5
|    |    +--- com.squareup.retrofit2:retrofit:2.6.0
|    |    |    \--- com.squareup.okhttp3:okhttp:3.12.0 (*)
|    |    +--- com.squareup.retrofit2:converter-gson:2.6.0
|    |    |    +--- com.squareup.retrofit2:retrofit:2.6.0 (*)
|    |    |    \--- com.google.code.gson:gson:2.8.5
|    |    +--- com.squareup.retrofit2:adapter-rxjava2:2.6.0
|    |    |    +--- com.squareup.retrofit2:retrofit:2.6.0 (*)
|    |    |    \--- io.reactivex.rxjava2:rxjava:2.0.0 -> 2.2.9 (*)
|    |    +--- com.squareup.okhttp3:okhttp:3.12.0 (*)
|    |    +--- com.squareup.okhttp3:logging-interceptor:3.12.0
|    |    |    \--- com.squareup.okhttp3:okhttp:3.12.0 (*)
|    |    +--- com.github.bumptech.glide:glide:3.7.0
|    |    +--- com.github.bumptech.glide:okhttp3-integration:1.4.0
|    |    +--- org.jsoup:jsoup:1.10.1
|    |    +--- com.arialyy.aria:aria-core:3.6.4
|    |    |    +--- com.arialyy.aria:aria-annotations:3.6.4
|    |    |    \--- com.arialyy.aria:aria-ftp-plug:1.0.4
|    |    +--- com.jakewharton:butterknife:9.0.0
|    |    |    \--- com.jakewharton:butterknife-runtime:9.0.0
|    |    |         +--- com.jakewharton:butterknife-annotations:9.0.0
|    |    |         |    \--- com.android.support:support-annotations:28.0.0
|    |    |         \--- com.android.support:support-compat:28.0.0 (*)
|    |    +--- com.belerweb:pinyin4j:2.5.1
|    |    +--- com.android.support:multidex:1.0.2
|    |    +--- com.tencent.bugly:crashreport:2.8.6.0
|    |    +--- org.greenrobot:eventbus:3.1.1
|    |    +--- cn.bingoogolapple:bga-qrcode-zbar:1.3.4
|    |    |    \--- cn.bingoogolapple:bga-qrcode-core:1.3.4
|    |    +--- top.zibin:Luban:1.1.3
|    |    +--- com.danikula:videocache:2.7.0
|    |    |    \--- org.slf4j:slf4j-android:1.7.21
|    |    |         \--- org.slf4j:slf4j-api:1.7.21
|    |    +--- com.android.support.constraint:constraint-layout:1.1.3
|    |    |    \--- com.android.support.constraint:constraint-layout-solver:1.1.3
|    |    +--- com.jcodecraeer:xrecyclerview:1.5.9
|    |    |    +--- com.android.support:appcompat-v7:23.4.0 -> 28.0.0 (*)
|    |    |    +--- com.android.support:recyclerview-v7:23.4.0 -> 28.0.0 (*)
|    |    |    \--- com.android.support:design:23.4.0 -> 28.0.0 (*)
|    |    +--- com.android.support:recyclerview-v7:28.0.0 (*)
|    |    +--- es.voghdev.pdfviewpager:library:1.0.5
|    |    |    +--- com.android.support:appcompat-v7:25.4.0 -> 28.0.0 (*)
|    |    |    \--- com.commit451:PhotoView:1.2.4
|    |    |         \--- com.android.support:support-v4:23.0.1 -> 28.0.0 (*)
|    |    +--- project :jpush
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41 (*)
|    +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.41 (*)
|    +--- com.android.support.constraint:constraint-layout:1.1.3 (*)
|    +--- com.wuxiaolong.pullloadmorerecyclerview:library:1.1.2
|    |    +--- com.android.support:appcompat-v7:25.0.0 -> 28.0.0 (*)
|    |    \--- com.android.support:recyclerview-v7:25.0.0 -> 28.0.0 (*)
|    +--- com.android.support:support-v4:28.0.0 (*)
|    +--- io.reactivex.rxjava2:rxjava:2.2.9 (*)
|    +--- io.reactivex.rxjava2:rxandroid:2.1.1 (*)
|    +--- com.tbruyelle.rxpermissions2:rxpermissions:0.9.5
|    +--- me.yokeyword:fragmentation:1.3.6 (*)
|    +--- com.orhanobut:logger:2.2.0 (*)
|    +--- com.google.code.gson:gson:2.8.5
|    +--- com.squareup.okhttp3:okhttp:3.12.0 (*)
|    +--- com.squareup.retrofit2:retrofit:2.6.0 (*)
|    +--- com.github.bumptech.glide:glide:3.7.0
|    +--- com.belerweb:pinyin4j:2.5.1
|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41 (*)
|    +--- cn.aigestudio.wheelpicker:WheelPicker:1.1.2
|    +--- com.github.1002326270xc:LayoutManager-FlowLayout:v1.7
|    |    +--- com.android.support:appcompat-v7:25.3.1 -> 28.0.0 (*)
|    |    \--- com.android.support:recyclerview-v7:25.3.1 -> 28.0.0 (*)
|    \--- com.contrarywind:Android-PickerView:4.1.8
|         +--- com.contrarywind:wheelview:4.0.9
|         |    \--- com.android.support:support-annotations:28.0.0
|         \--- com.android.support:support-annotations:28.0.0
+--- com.android.support:multidex:1.0.2
+--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41 (*)
+--- io.socket:socket.io-client:1.0.0
|    \--- io.socket:engine.io-client:1.0.0
|         \--- com.squareup.okhttp3:okhttp:3.8.1 -> 3.12.0 (*)
+--- io.reactivex.rxjava2:rxjava:2.2.9 (*)
+--- io.reactivex.rxjava2:rxandroid:2.1.1 (*)
+--- com.tbruyelle.rxpermissions2:rxpermissions:0.9.5
+--- me.yokeyword:fragmentation:1.3.6 (*)
+--- com.orhanobut:logger:2.2.0 (*)
+--- com.google.code.gson:gson:2.8.5
+--- com.squareup.okhttp3:okhttp:3.12.0 (*)
+--- com.squareup.retrofit2:retrofit:2.6.0 (*)
+--- com.github.bumptech.glide:glide:3.7.0
+--- com.jakewharton:butterknife:9.0.0 (*)
+--- com.belerweb:pinyin4j:2.5.1
+--- org.greenrobot:eventbus:3.1.1
+--- com.android.support.constraint:constraint-layout:1.1.3 (*)
+--- com.zhihu.android:matisse:0.4.3
|    +--- com.android.support:support-v4:25.3.1 -> 28.0.0 (*)
|    +--- com.android.support:appcompat-v7:25.3.1 -> 28.0.0 (*)
|    +--- com.android.support:support-annotations:25.3.1 -> 28.0.0
|    +--- com.android.support:recyclerview-v7:25.3.1 -> 28.0.0 (*)
|    \--- it.sephiroth.android.library.imagezoom:library:1.0.4
|         \--- it.sephiroth.android.library.easing:library:1.0.2
\--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41 (*)

接下来开始分析问题:

比如这里依赖了知乎的开源库,它自己的版本是0.4.3,而里面依赖的库都不是最新的,说明了一个问题:很有可能‘0.4.3’已经不是最新的版本了。查一下,果然最新的已经是'0.5.2-beta5'。

|    +--- com.android.support:support-v4:25.3.1 -> 28.0.0 (*)

+--- com.zhihu.android:matisse:0.4.3
|    +--- com.android.support:support-v4:25.3.1 -> 28.0.0 (*)
|    +--- com.android.support:appcompat-v7:25.3.1 -> 28.0.0 (*)
|    +--- com.android.support:support-annotations:25.3.1 -> 28.0.0
|    +--- com.android.support:recyclerview-v7:25.3.1 -> 28.0.0 (*)
|    \--- it.sephiroth.android.library.imagezoom:library:1.0.4
|         \--- it.sephiroth.android.library.easing:library:1.0.2

现在的依赖关系如下:

发现这时的依赖变成了androidx,如果你项目使用了androidx 倒是不存在问题,如果没有依赖androidx,你要么去支持androidx(很麻烦的),要么退到没有androidx 的版本,这里是'0.5.2-beta4'。

com.zhihu.android:matisse:0.5.2-beta5
|    +--- androidx.appcompat:appcompat:1.0.2
|    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    +--- androidx.core:core:1.0.1
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    +--- androidx.collection:collection:1.0.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.arch.core:core-common:2.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    \--- androidx.versionedparcelable:versionedparcelable:1.0.0
|    |    |         +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |         \--- androidx.collection:collection:1.0.0 (*)
|    |    +--- androidx.collection:collection:1.0.0 (*)
|    |    +--- androidx.cursoradapter:cursoradapter:1.0.0
|    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    +--- androidx.documentfile:documentfile:1.0.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    +--- androidx.loader:loader:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0
|    |    |    |    |    +--- androidx.arch.core:core-runtime:2.0.0
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
|    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0 (*)
|    |    |    |    |    |    +--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    \--- androidx.arch.core:core-runtime:2.0.0 (*)
|    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0
|    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    \--- androidx.print:print:1.0.0
|    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    +--- androidx.fragment:fragment:1.0.0
|    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-ui:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    |    |    +--- androidx.customview:customview:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    \--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    +--- androidx.viewpager:viewpager:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.drawerlayout:drawerlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.interpolator:interpolator:1.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    |    \--- androidx.interpolator:interpolator:1.0.0 (*)
|    |    |    |    +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    \--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    \--- androidx.cursoradapter:cursoradapter:1.0.0 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    +--- androidx.loader:loader:1.0.0 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 (*)
|    |    +--- androidx.vectordrawable:vectordrawable:1.0.1
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    \--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    \--- androidx.vectordrawable:vectordrawable-animated:1.0.0
|    |         +--- androidx.vectordrawable:vectordrawable:1.0.0 -> 1.0.1 (*)
|    |         \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
|    +--- androidx.annotation:annotation:1.0.1
|    +--- androidx.recyclerview:recyclerview:1.0.0
|    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
|    \--- it.sephiroth.android.library.imagezoom:library:1.0.4
|         \--- it.sephiroth.android.library.easing:library:1.0.2

修改后的依赖关系如下:

+--- com.zhihu.android:matisse:0.5.2-beta4
|    +--- com.android.support:support-v4:27.1.1 -> 28.0.0 (*)
|    +--- com.android.support:appcompat-v7:27.1.1 -> 28.0.0 (*)
|    +--- com.android.support:support-annotations:27.1.1 -> 28.0.0
|    +--- com.android.support:recyclerview-v7:27.1.1 -> 28.0.0 (*)
|    \--- it.sephiroth.android.library.imagezoom:library:1.0.4
|         \--- it.sephiroth.android.library.easing:library:1.0.2

还是有依旧不是最新的,但是没有影响,是被忽略了的(*)。

新的依赖查看:Gradle中就可以直接查看了

就没有了依赖冲突的解决方案提示了,但是我们还是可以直接查看依赖升级的建议:

 

升级的时的问题

不知大家手上有没有老项目,加点依赖总是感觉不兼容,加不进去?

这里还有一个级别高的依赖那就是项目依赖,我这里的gradle版本最开始是‘2.3.0‘加什么东西都可能不兼容,在我升级realm数据库版本的时候就出现了问题,我直接向realm升级到’5.14.0‘,发现它要求gradle 版本升级,于是我升级了,但是最新正式版本’3.5.0‘,编译ADIL会出问题(>.< ~~~~有大佬知道的吗,给个留言),我就退而求其次,选择’3.4.2‘。

建议(更新与2021.1.7):

1·老项目升级时,一点一点的升级,

2.遇到有api更改的,先退回

3.gradle版本要和 com.android.tools.build:gradle 同步一致

       这两个越高越好,特别是超低版本升级后,会发现编译时间极大的减少,但是项目会占用硬盘空间

       就我这旧电脑和 android 9 手机 而言

android studiogradlecom.android.tools.build:gradle打包第一次打包上手机
4.1.15.13.4.38 * 60s60s
4.1.16.54.1.03 m 19 s 629 ms41 s 128 ms
     
     

 像我说的我在一步步升级,升级到更高版本后我在来记录!

4.上一条应该和其他依赖分开来处理升级

5.关于android 或者 与android 库有关的依赖 最新版的不一定是最合适的(特别是android 到 androidx的变化)

顺便提一下 - 包冲突问题

如果之前项目中是将依赖源码下载,用module的方式依赖,而后面在某个地方再次使用配置的方式依赖进来(或者是依赖树中包含),在打包apk时会提示包冲突,所以要么删除这个module,要么忽略树依赖中的依赖。

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 安卓应用市场升级需要以下几个步骤: 1. 了解用户需求:在进行应用市场升级之前,需要了解用户的需求。通过分析用户反馈和市场数据,了解用户对产品的要求和期望,从而有针对性地改进产品。 2. 更新内容优化:在更新应用市场之前,应该对新版应用的内容进行优化。增强应用的稳定性、安全性、用户体验和功能扩展,从而提高用户满意度和应用市场的品牌口碑。 3. 开展营销活动:应用市场升级后,可以通过市场营销和推广活动来推广产品。可以采用广告、优惠券等方式来吸引用户下载和体验升级后的新版应用。 4. 测试和发布新版应用:在进行应用市场升级之前,需要进行产品的测试和评估。评估是否符合用户要求和品牌要求。在发布之前,需要确保应用程序的运行稳定性、兼容性和安全性。同时,还要向用户提供下载和安装指南,使用户更轻松地安装和使用新版应用。 总之,对于安卓应用市场升级,需要考虑到用户需求、应用内容优化、营销工作以及测试和发布。通过这些工作,可以提高应用市场品牌的形象和用户满意度,并进一步加强公司的市场竞争力。 ### 回答2: 安卓app应用市场的升级是指将现有的应用版本更新到一个新版本,以提供更好的功能和用户体验。以下是一个简单的步骤,说明如何进行安卓app应用市场的升级: 1. 收集用户反馈:在进行升级之前,可以通过用户反馈、调查问卷等渠道了解用户的需求和期望,以确定升级的重点和方向。 2. 分析和规划:根据用户反馈和市场需求,分析现有版本的不足之处,并规划新版本的功能和改进点。确定新版本的目标和时间计划。 3. 开发和测试:根据规划,进行新版本功能的开发和测试。开发团队可以根据需求进行功能优化和bug修复,确保新版本的稳定性和可靠性。 4. 发布和推广:完成开发和测试后,将新版本发布到应用市场。发布前,可以进行适当的推广活动,如预告、宣传和优惠等,吸引用户下载和体验新版本。 5. 迭代和改进:发布新版本后,持续收集用户的反馈和建议,及时修复bug,并根据用户需求进行迭代开发和改进。保持与用户的良好沟通,不断提升应用的品质和用户体验。 总体来说,安卓app应用市场的升级需要团队的努力和用户的支持。通过不断改进和优化,实现应用的持续发展和用户满意度的提升。 ### 回答3: 安卓app应用市场升级是指将已发布的应用程序版本进行更新或升级,以提供更好的用户体验和功能改进。下面是关于如何进行安卓app应用市场升级的一些建议: 1.版本迭代:在升级应用前,应首先了解用户的需求和反馈,分析已发布版本的问题和不足之处,确定升级的目标和方向。根据需求进行功能优化、用户界面改进或者修复已知的漏洞等。 2.测试与优化:在应用升级前进行全面的测试是很重要的,确保新版本的稳定性和兼容性。测试过程中,可以使用模拟环境或实际设备进行功能测试、性能测试、兼容性测试等。同时,还需要收集用户的反馈和bug报告,及时解决问题。 3.版本控制与发布:在应用升级的过程中,需要进行版本控制,确保不同版本之间的升级和回退能够顺利进行。为用户提供新版本的下载地址,并通过在线更新、应用内提示或邮件通知等方式告知用户新版本的发布。 4.用户反馈与持续改进:在升级后,及时收集用户的反馈和意见,了解用户对新版本的评价和使用情况。根据用户反馈,进行持续改进和优化,保持与用户的良好互动,增强用户对应用的依赖和信任。 5.市场推广和宣传:升级应用后,适当进行市场推广和宣传,提高用户的知晓度和选择性。可以通过在应用市场更新升级介绍、发布新版本的公告、社交媒体宣传等方式,提高新版本的曝光度。 通过以上步骤,可以帮助开发者顺利进行安卓app应用市场的升级工作,进一步提升应用的质量和用户满意度。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值