简体   繁体   English

安装APK时解压缩Assets文件夹中的Rar文件

[英]Unpack Rar File in assets folder when install apk

嗨,有什么方法可以将RAR存档放到Assets文件夹中,并且当用户尝试安装apk时将其及其用户文件解压缩吗?

is there any way to put a RAR archive in assets folder 有什么办法可以将RAR存档放到资产文件夹中

You are welcome to put any sort of file in assets/ . 欢迎您将任何类型的文件放在assets/

when user try to install apk unpack it and user files inside that ? 当用户尝试安装apk时,将其和其中的用户文件解压缩?

You are welcome to unpack it when the user first runs the app. 用户首次运行应用程序时,欢迎您将其打开包装。 You have no means of unpacking it before then, and Android is not going to do anything with your assets on its own. 在此之前,您无须解压缩它,Android不会自行处理您的资产。

Note that Android does not have RAR APIs. 请注意,Android没有RAR API。 Either switch to something Android has (eg, ZIP) or you will need to find some Android-compatible RAR file. 切换到Android具有的版本(例如ZIP),或者您需要找到一些Android兼容的RAR文件。 Or, since APK files are already compressed, forget about the RAR and puts its unpacked contents directly in assets/ . 或者,由于APK文件已被压缩,因此无需理会RAR,并将其解压缩后的内容直接放在assets/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM