问题
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