[英]MBTilesWriter java.lang.UnsatisfiedLinkError slice-sqlite-jdbc-3.8.7
im using the mbtiles4j writer inside an Android App to create a new .mbtiles file in an AsyncTask class.即时通讯使用mbtiles4j的Android应用程序内的作家创造的的AsyncTask类的新.mbtiles文件。
Here is my java code:这是我的Java代码:
private class FetchData extends AsyncTask<String, Void, String> {
private Exception exception;
@Override
protected String doInBackground(String... routeSelected) {
MBTilesWriter w = null;
String filePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/MyRoutes/" + routeSelected;
try {
outputFile = new File(filePath);
w = new MBTilesWriter(outputFile);
new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/MyRoutes").mkdirs();
} catch (MBTilesWriteException e) {
this.exception = e;
System.out.println("exception: " + e);
return "";
}
//Irrelevant code removed here...
return filePath;
}
}
Full error report on windows 10 x64 bit. Windows 10 x64 位的完整错误报告。 http://pastebin.com/raw/fhSH8qJr http://pastebin.com/raw/fhSH8qJr
build.gradle looks as follows build.gradle 如下所示
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//compile 'org.imintel:mbtiles4j:1.0.5'
compile 'org.xerial:sqlite-jdbc:3.8.7'
compile 'commons-io:commons-io:2.5'
mbtiles4j is actually included inside my project: see screenshot. mbtiles4j 实际上包含在我的项目中:见截图。 There were other problems with including it through build.gradle, so I managed to workaround it like this.通过 build.gradle 包含它还有其他问题,所以我设法像这样解决它。 The mbtilesreader works fine! mbtilesreader 工作正常!
Edit: disabled instant run, error code is now: couldn't find "libsqlitejdbc.so"编辑:禁用即时运行,错误代码现在是:找不到“libsqlitejdbc.so”
Solution thanks to @Morrison Chang and @ cCOOK感谢@Morrison Chang 和@cCOOK 的解决方案
I had to rewrite the MBTilesWriter for specific Android implementation.我不得不为特定的 Android 实现重写 MBTilesWriter。 Check it out here在这里查看
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.