[英]How to avoid using + in version number with SQLiteAssetHelper
I am using the SQLiteAssetHelper class to manage an SQLite database in my app.我正在使用 SQLiteAssetHelper 类来管理我的应用程序中的 SQLite 数据库。
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.为此,我按照有关如何在 GitHub 上使用 SQLiteAssetHelper 的说明进行操作,即将compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
到我的 build.gradle 文件中的依赖项中。
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
但是,当我这样做时,android studio 给了我一个黄色警告,说avoid using + in version numbers; can lead to unpredictable and unrepeatable builds
avoid using + in version numbers; can lead to unpredictable and unrepeatable builds
Sounds ominous *Gulp*听起来不祥*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:+'
但是我将在下面发布的这个 GitHub 页面没有提供版本号,它只是说添加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 https://github.com/jgilfelt/android-sqlite-asset-helper
If you click on the releases tab , you can see that the most recent release is 2.0.1.如果单击发布选项卡,您可以看到最新版本是 2.0.1。 It is better that you specify this explicitly in order to have predictable builds.最好明确指定这一点以获得可预测的构建。
Use用
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
This site - "Gradle, please" - can be helpful sometimes.这个站点 - “Gradle, please” - 有时会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.