How to avoid using + in version number with SQLiteAssetHelper

不打扰是莪最后的温柔 提交于 2020-01-05 04:24:15

问题


I am using the SQLiteAssetHelper class to manage an SQLite database in my app.

To do this I have followed the instructions on how to use SQLiteAssetHelper on GitHub, which is to add compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+' to my dependencies in my build.gradle file.

However, when I do this, android studio gives me a yellow warning, which says avoid using + in version numbers; can lead to unpredictable and unrepeatable builds

Sounds ominous *Gulp*

but this GitHub page, which I will post below, doesn't offer a version number, it just says to add compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'

Should I just leave the +? or is there a better way to do this?

https://github.com/jgilfelt/android-sqlite-asset-helper


回答1:


If you click on the releases tab, you can see that the most recent release is 2.0.1. It is better that you specify this explicitly in order to have predictable builds.




回答2:


Use

compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'

This site - "Gradle, please" - can be helpful sometimes.



来源:https://stackoverflow.com/questions/39710042/how-to-avoid-using-in-version-number-with-sqliteassethelper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!