创建存储在数据/数据​​/包名/文件夹.apk文件数据 [英] Create .apk file data to be stored in data/data/package_name/files folder

查看:101
本文介绍了创建存储在数据/数据​​/包名/文件夹.apk文件数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的申请,我下载了一些文件,并将其存储在数据/数据​​/程序包/文件的文件夹,我访问和查看这些文件,我下载该文件一次,并且每次我运行的应用程序。

因为数据是数据/数据​​/程序包/文件的文件夹持久的,因此它不会丢失,我可以查看文件时,会话结束。

这一切,我在模拟器中做的事情。现在,我已经创建了我的申请,.apk文件和实际设备上安装它。我期待的数据/数据​​/包名/文件也挤满了,但它没有发生。我看不到下载的文件。

由于我的问题是我无法从我的实际设备连接到互联网,我无法下载文件。有没有办法,我可以创建随着数据/数据​​/包名/文件的数据的.apk文件什么办法?


解决方案

保存这些文件夹入资产价值,而不是在你的应用程序存储空间节省,也不会与你apk.below链接去将帮助你在同一个< A HREF =htt​​p://mylifewithandroid.blogspot.com/2009/06/assets.html相对=nofollow>存储文件的资产将与APK

From my application I am downloading a few files and storing it in data/data/package_name/files folder and I'm accessing and viewing those files and I download that file once and each time I run application.

I could view that file as the data is persistent in data/data/package_name/files folder so it is not lost when session ends.

All this I am doing in the emulator. Now I have created an .apk file of my application and installed it on a real device. I am expecting that the "data/data/package_name/files" is also packed up with it but which is not happening. I can't see the downloaded file.

As my problem is that I could not connect to Internet from my real device, I could not download file. Is there any way that I could create an .apk file along with the data in "data/data/package_name/files"?

解决方案

save these files in assests folder, instead of saving in your app memory space, it will not go with your apk.below link will help you in the same storing file in assets which will go with apk

这篇关于创建存储在数据/数据​​/包名/文件夹.apk文件数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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