在迁移到sqlite-android的过程中,使用Robolectric运行集成测试时遇到问题。我收到以下错误:
java.lang.UnsatisfiedLinkError: no sqlite3x in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at io.requery.android.database.sqlite.SQLiteDatabase.<clinit>(SQLiteDatabase.java:86)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:227)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:174)
和
java.lang.NoClassDefFoundError: Could not initialize class io.requery.android.database.sqlite.SQLiteDatabase
at io.requery.android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:227)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:174)
我读了一些似乎与here和here相关的内容,但我不明白如何让Robolectric加载sqlite-android使用的原生'.so'库。我正在运行Windows 10-64bit
是否可以使用Robolectric和sqlite-android运行集成测试?