Important: Please read the Qt Code of Conduct -

Include rcc file in Android version of application

  • Hello dear programmers .
    well as the topic says i have a program with large resources wich made me to use rcc files instead of qrc.
    i read this article
    and i know the qrc is a multiplatform solution for this kind of situation but i get error while compiling my qrc into the main application
    ":-1: error: [qrc_images.obj] Error 1"
    which i believe it's because of the large size of the qrc file.(60mb)
    well first is there any way to use the rcc file instead of qrc.
    if not then must be something im doing wrong.
    any idea?

  • Lifetime Qt Champion


    rcc is the tools that converts your .qrc file in code. Do you mean that you have a .qrc file that weighs 60MB or that you have may files to include that makes that size ?

    In any case, you can generate an external binary resource .

  • @SGaist
    Well i have a windows version of my software that uses the rcc file already.


    in my windows version ,files in the rcc resource load with no problem but
    in android version my files which are images won't load.

  • Lifetime Qt Champion

    Check that you are deploying the file correctly with your application.

    Also, I'd recommend generating a full path to your resource file rather that a relative like you are doing currently. That will ensure that wherever you start your application from it uses the right folder.

  • @SGaist
    dont know how to use the full address ,when i use this :

    qDebug()<<QResource::registerResource("f:/Users/MeHrAnM.D/Desktop/Tarh bartar v0.9beta Data V0.01/bin/resources.rcc");

    still get the false output.
    last time for thr windows version i had the same problem with registering the rcc file ,
    i used this command:


    and located the folder it was pointing and copied the rcc there.
    now when i use that command i get the
    which there is no place like this in my PC.

  • Lifetime Qt Champion

    Don't hardcode the path in your code. Use QCoreApplication:: applicationDirPath.

    QDir::currentPath won't necessarily return the application executable path.

  • well i gave up on using rcc file in my project .
    i used exact copy of my windows version and compiled it for android and the rcc wasn't loaded.
    instead i used multiple qrc can use up to 20mb qrc files.

Log in to reply