Qt 5.2 Including External File into an Android Package?

Viewed 11597

How to include an external file into 'apk' ?

Example:

There is "123.txt" in the main directory where .pro file exists. What should I add to pro file to put "123.txt" into apk.

I tried DEPLOYMENT, DEPLOYMENTFOLDERS. But they only works with Symbian and Windows CE.

5 Answers

One more simple way to do that:

  1. Add this string into your .pro

ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources

  1. Create android-sources folder in your proj folder. Put anything you need into android-sources/assets/. You can also put there any other files, such as AndroidManifest.xml or android-sources/res/drawable/icon.png that you want to be copied and updated into the target bundle.
Related