Forums

OverviewFelgo 2 Support (Qt 5) › Can\'t find some qml files on android

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #17033

    Lorne

    I have our app running fine on the desktop, now I want it to run on Android.  The problem is that my custom Page is not being found.  This is the error that I’m getting:

    file:assets:/qml/TopPage.qml:19 ((null)): file:assets:/qml/TopPage.qml:19:9: ActivityPage is not a type

     

    I look in the generated apk file and I can see all of my qml files are in the assets/qml directory.  I’m not sure why it’s not loading or how to diagnose what’s going wrong.  Any help would be appreciated.

     

    #17034

    Marcin

    Hi,
    Sorry if it’s sound really trivial but just want to be sure, so few basic questions:

    1. I am pretty sure that is the case but to double check, your custom page is ActivityPage.qml and it is 100% written this way, the name of the file, no lower case etc.
    2. Are you deploying debug or production configuration(do you use resources deployment like proposed on production or default one)?
    3. How did you create your app, using any of the Templates(File->New Project->Felgo Game/App)?
    4. Sometimes I observed during Android deployment it is really useful to clean old version of the app, otherwise sometimes new changes are not deployed.
    Projects on the left, click Run configuration under Android then on the right, under Deploy Configuration, click  Details and check box  “Uninstall previous package”
    5. Random fix which sometimes helps 🙂 Could you delete everything from build directory for Android mentioned in point 4 and try again?

    #17037

    Lorne

    senkal said:

    Hi,
    Sorry if it’s sound really trivial but just want to be sure, so few basic questions:

    1. I am pretty sure that is the case but to double check, your custom page is ActivityPage.qml and it is 100% written this way, the name of the file, no lower case etc.

    Yes, the file is ActivityPage.qml.  Everything works perfect on desktop, so I know it’s correct.

    2. Are you deploying debug or production configuration(do you use resources deployment like proposed on production or default one)?

    Just default values as far as I know.  It’s a debug configuration.

    3. How did you create your app, using any of the Templates(File->New Project->Felgo Game/App)?

    I used the Felgo App template.

     

    4. Sometimes I observed during Android deployment it is really useful to clean old version of the app, otherwise sometimes new changes are not deployed.

    I have done that.  I’ve completely deleted the build directory and created it all from scratch.

     
    Projects on the left, click Run configuration under Android then on the right, under Deploy Configuration, click  Details and check box  “Uninstall previous package”

    I’ve  tried that.  I’ve also manually uninstalled it from the device before reinstalling

    5. Random fix which sometimes helps 🙂 Could you delete everything from build directory for Android mentioned in point 4 and try again?

    Yes I’ve completely blown away the directory a few times.

     

    Thanks for the suggestions

    #17040

    Marcin

    Hi,
    Thank you for all the answers.
    To be honest, if it’s one of those “it is my machine specific situation” bugs, then I don’t have enough knowledge probably to help you more.
    The only thing I can ask for is to provide minimal example where it fails.
    Can be something like :
    1. Create any new Felgo App using the creator
    2. Put this in Main.qml
    3. Put this content in qml/ActivityPage.qml

    You can provide the minimal example, it’s up to you.
    Anyway probably somebody from Felgo will give you some suggestions.

    #17043

    Günther
    Felgo Team

    Hi,

    cheers to Marcin, he already included the common mistakes in his answers.

    As you created a completely fresh build already, and I guess the other QML files in the same source directory work fine, the most reasonable cause would be a file-name mismatch of e.g. lowercase vs uppercase letters for ActivityPage.qml. It may work correct on Desktop, as the file system ignores uppercase/lowercase differences. However, this is not the case on Android devices, so it’s possible that the QML engine is able to load the type on Desktop, but does not find the QML file on Android.

    Can you please double-check that:

    • Your file is called exactly ActivityPage.qml
    • Your code includes the import for the directory where the file lies
    • You use the exact same name as when using ActivityPage { } in QML
    • Clean everything / try with a fresh project before building

     

     

    If this doesn’t help, you can send a fresh project with a simple code example where the issue occurs for you to support@felgo.com.
    We’ll have a look at the project!

    Best,
    Günther

     

    #17063

    Lorne

    I was able to narrow down the problem to the license.  If I apply a license, I get the error.  If I don’t apply the license, the qml files load fine.  I’ve sent off a project to support, just waiting on a response now.

    #17071

    Günther
    Felgo Team

    Hi Lorne,

    we’ve received your project and get back to you once we had a closer look!

    Best,
    Günther

    #17093

    Lorne

    This was resolved.  For anyone searching, the problem was that I didn’t change all the strings in my project. Following everything the Publishing guide worked out.

     

Viewing 8 posts - 1 through 8 (of 8 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support