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
…
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
-
Thanks for answer, tried this, but it doesn't work :( please note that I'm using Qt 5.2 – Nick Moskalenko Dec 12 '13 at 10:21
-
Actually it does work. Doublecheck ;) This is the way qml files copied by QtCreator itself. – Volodymyr K. Apr 2 '14 at 21:24
-
Worked, thank you. However, it seems that these blocks can't appear in conditional blocks, strange... – Avio May 29 '14 at 9:39
-
-
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.
-
1I'm developing application using Qt 5.2 the question is how to make it by Qmake – Nick Moskalenko Dec 11 '13 at 17:12
Copying files to /5.2.0/android_armv7/src/android/java/assets did the trick