如何添加添加自定义资产注入.apk文件? [英] How to add add custom assets into .apk file?

查看:186
本文介绍了如何添加添加自定义资产注入.apk文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Android的资产文件夹中的一些文件,我怎么能使用QtCreator / QMAKE添加它们?

I need to have some files in android assets folder, how can I add them using QtCreator/QMake?

推荐答案

假设你已经在你的源代码目录的结构如下:

Assuming you have the following structure in your source directory:

foo.pro
extra_data/file1
extra_data/file2
…

添加以下内容foo.pro应该部署extra_data文件夹资产:// extra_data(确切路径可能会有所不同,现在无法验证)在APK:

Adding the following to foo.pro should deploy the extra_data folder to assets://extra_data (exact path might differ, cannot verify right now) in the APK:

folder_01.source = extra_data
folder_01.target = extra_data
DEPLOYMENTFOLDERS += folder_01

这篇关于如何添加添加自定义资产注入.apk文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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