android studio dependencies compile,Android Compile Dependencies - Gradle Build

My question is a simple one which I'm not sure how to tackle.

When compiling libraries in gradle, I use the code shown below:

dependencies {

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

compile 'com.android.support:cardview-v7:21.0.+'

compile 'com.android.support:recyclerview-v7:21.0.+'

compile 'com.android.support:design:22.2.+'

compile 'com.android.support:appcompat-v7:22.2.+'

}

This gives me the what I want and I have no issues whatsoever. I'm guessing the code above makes sure that the latest version of each dependency is compiled when the app is built (hence the "+" sign at the end of each statement). However, I've seen in many places online where the same lines of code are as shown below without the "+" sign:

dependencies {

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

compile 'com.android.support:cardview-v7:21.0.0'

compile 'com.android.support:recyclerview-v7:21.0.0'

compile 'com.android.support:design:22.2.0'

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

}

There is no discernible difference and both work fine the same. But as a developer with intentions to have long term support for the app, which should I use? With or without the appended "+" sign. What are the possible benefits or issues from using one over the other? Any feedback would be highly appreciated.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值