问题
I need to have some files in android assets folder, how can I add them using QtCreator/QMake?
回答1:
Assuming you have the following structure in your source directory:
foo.pro
extra_data/file1
extra_data/file2
…
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
回答2:
If you are developing the application, then simply copy/paste the files in assets folder.
But if your application is already built and available as .apk file then you cannot modify any of its content.
回答3:
Copying files to /5.2.0/android_armv7/src/android/java/assets did the trick
来源:https://stackoverflow.com/questions/20520745/how-to-add-add-custom-assets-into-apk-file