不能生成文件夹中包含的Andr​​oid APK安装后离线数据库 [英] Cant generate folders contains Offline Database after Android APK installation

查看:287
本文介绍了不能生成文件夹中包含的Andr​​oid APK安装后离线数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用SQLite作为我的离线数据库。将APK安装完毕后,我找不到我做的文件夹。我希望把设备存储数据库:/存储/模拟/ 0(三星,我测试了我的程序设备)

I use SQLite as my offline database. After the APK installation, I couldn't find the folders that I made. I want to put the database in device Storage : /storage/emulated/0 (Samsung device where I tested my program).

我已经把这个在我的清单:

I already put this in my manifest :

<manifest android:installLocation="preferExternal" />

要安装APK,我直接复制它的,以我的手机外置存储。我错过了什么?

To install APK, i copied it directly from bin to my phone external storage. Did I miss something?

**注:我需要让用户能够访问从设备存储文件(.txt和.xml),因此,文件夹和文件里面不应该被隐藏

**notes: I need for users to be able to access files (.TXT and .XML) from device storage, so the folders and files inside shouldn't be hidden.

我倒是AP preciate您的善意回复..谢谢

I'd appreciate your kind reply.. Thanks

推荐答案

的installLocation =preferExternal指的是应用程序的安装,而不是最终的数据库(我没有看到你的问题中提到的任何地方,比其标题等)。

installLocation="preferExternal" refers to the app installation, not to an eventual database (which I don't see mentioned anywhere in your question, other than in its title).

我直接复制从斌到我的手机外置存储。我错过了什么 :这是不够的结果。
你必须安装的APK,复制后 - 你需要一个文件管理器来启动它结果
OR(更好)的激活调试选项并从IDE运行该应用程序直接到您的手机(你需要安装ADB桥,又名 USB驱动程序,又名亚行复合接口)。

i copied it directly from bin to my phone external storage. Did I miss something? YES: this is not enough.
You have to install the apk, after copying it - you'll need a file manager to launch it.
OR (better) activate your Debug Options and run the app from the IDE directly onto your phone (you'll need to install the ADB Bridge, aka USB driver, aka ADB Composite Interface).

所以里面的文件夹和文件不应该被隐藏。中的APK每个文件是的私人以您的应用程序。结果
除此之外,你的SD卡,然后从那里使用它们。结果
使用 Environment.getExternalStorageDirectory()来获取路径到你的SD卡。

so the folders and files inside shouldn't be hidden. Every file in the apk is private to your app.
Other than this, your SD Card and then use them from there.
Use Environment.getExternalStorageDirectory() to get the path to your SD Card.

如果您需要关于数据库澄清,请发表​​有关该事项的具体问题。

If you need some clarification on databases, please post a specific question about that matter.

这篇关于不能生成文件夹中包含的Andr​​oid APK安装后离线数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆