Manage Android dependencies versions using gradle extra properties.
2016-08-30 09:27
405 查看
android中gradle依赖包的版本经常一动都动,要保持一致,下面有个简单的方法。(原理似xml文件中调用string)
本来app gradle如下图所示
然后,可以改成下图所示,即可做到。
但是,如果有多个modules呢,将要对工程的gradle进行改动。
app gradle变为如下所示。
以后改正的时候只需要改ext里面的内容。
本来app gradle如下图所示
然后,可以改成下图所示,即可做到。
但是,如果有多个modules呢,将要对工程的gradle进行改动。
app gradle变为如下所示。
以后改正的时候只需要改ext里面的内容。
相关文章推荐
- Android Studio创建新项目出错 Could not fetch model of type 'IdeaProject' using Gradle distribution
- [Android Studio] Gradle fails to resolve dependencies in Android Studio
- Set "$USE_DEPRECATED_NDK=true" in gradle.properties to continue using the current NDK integration. 解决办法
- android studio gradle dependencies 包存放在哪儿?
- android studio 编译apk出现 设置android studio in the gradle.properties file, sets the maximum Java heap si
- [Android Tips] 11. How to Create a Release Signed APK File using Gradle
- Android Studio 报错“Gradle sync failed: Declaring custom 'clean' task when using the standard Gradle ”
- [Android Tips] 24. Gradle listing project dependencies
- android.useDeprecatedNdk=true 添入工程根目录下的新建 gradle.properties 文件
- Android studio Declaring custom 'clean' task when using the standard Gradle lifecycle解决方法
- android.useDeprecatedNdk=true 添入工程根目录下的新建 gradle.properties 文件
- The project 'FeiYueXueTang_Android' may be using a version of Gradle that does not contain the metho
- The project is using an unsupported version of the Android Gradle plug-in
- Android 之 Error:Minimum supported Gradle version is 2.14.1. Current version is 2.10. If using the g
- Error:The project is using an unsupported version of the Android Gradle plug-in (0.8.3). The recomme
- Android 新建工程 卡在Gradle:Resolve dependencies':app:_debugCompile'
- android studio build.gradle 中的dependencies 的 compile jar文件
- This warning can be disabled by using the command line flag -Dcom.android.build.gradle.overridePath
- Android笔记:. Android Studio创建新项目出错 Could not fetch model of type 'IdeaProject' using Gradle distribut
- Android Gradle文件下获取自定义properties文件,并且获取值或者修改值