[英]Copy a database file in android
I am developing an android application that copies a database file from /data/data/com.example/database.db
我正在开发一个从
/data/data/com.example/database.db
复制数据库文件的android应用程序
But it give me an access denied file 但这给了我一个拒绝访问的文件
EACCES permission denied
EACCES权限被拒绝
Could anybody help me how to permit the access? 有人可以帮助我如何允许访问吗?
If you are copying you probably need the android.permission.WRITE_EXTERNAL_STORAGE
permission in your manifest. 如果要复制,则清单中可能需要
android.permission.WRITE_EXTERNAL_STORAGE
权限。
Add this to your manifest: 将此添加到您的清单:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
(see https://developer.android.com/guide/topics/manifest/uses-permission-element.html for how to use the uses-permission tag in the manifest) (有关如何在清单中使用uses-permission标签,请参见https://developer.android.com/guide/topics/manifest/uses-permission-element.html )
Add it and let us know if you still get the error. 添加它,让我们知道您是否仍然收到错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.