Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

魅蓝 5 报错:SQLiteLog:cannot open file at line 31320 of [2ef4f3a5b1] #389

Open
CaptainJno opened this issue Aug 28, 2017 · 5 comments

Comments

@CaptainJno
Copy link

CaptainJno commented Aug 28, 2017

机型:魅蓝5--YunOS版本5.1.1--Android版本6.0(其他手机上未发现问题)
编译配置:compileSdkVersion 24,buildToolsVersion '25.0.0',minSdkVersion 15,targetSdkVersion 22。(宿主和插件配置都一样)
DroidPlugin代码版本:截止问题发布当天,github最新的代码
情况:在插件中操作数据库时,出现崩溃,报错日志截取如下图
image

@safingchoi
Copy link

你数据库存操作是用Litepal吗?

@CaptainJno
Copy link
Author

@safingchoi 用的原生的SQLite

@safingchoi
Copy link

我在preLoadApk 函数中加入:(可以解决7.0以下的,但现在7.0的部分手机还会出现)
FieldUtils.writeDeclaredField(loadedApk, "mAppDir", PluginDirHelper.getPluginApkFile(hostContext, pluginInfo.packageName));
FieldUtils.writeDeclaredField(loadedApk, "mDataDir", PluginDirHelper.getPluginDataDir(hostContext, pluginInfo.packageName));
FieldUtils.writeDeclaredField(loadedApk, "mLibDir", PluginDirHelper.getPluginNativeLibraryDir(hostContext, pluginInfo.packageName));
FieldUtils.writeDeclaredField(loadedApk, "mDataDirFile", new File(PluginDirHelper.getPluginDataDir(hostContext, pluginInfo.packageName)));

@safingchoi
Copy link

@cmzy 有办法解决7.0的吗,创建不了数据库

@CaptainJno
Copy link
Author

@cmzy 我也问一下,我的问题是否是普遍现象?另外,是否有解决办法?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants