How to deploy Android project when using subdirs?



  • Hello,

    After restructuring the project this week to support two important libraries I noticed that I can't deploy to Android anymore...

    The layout of the project is pretty simple..

    • Root
      • 3rdparty folder (libraries, libraries have their own .pro file)
      • src folder (main app, template as app)
      • app.pro (TEMPLATE= subdirs) compiles 3rdparty libraries before main app.

    The project compiles completely using android sdk provided compilers, but it either tells me

    • Cannot find .pro file
    • androiddeploy cannot find json file.

    Any suggestion on how to fix this?

    side note: Apparently there was a bug similar to this, targeting Qt 5.2 but... there was never any solution provided or any workaround in the comments section.



  • Just some ideas / traditional advices:

    1. If you know there has been / may be a bug, you should check whether it has finally been fixed in 5.6 beta; and if you know about the reported bug, you should give a reference to it here so we could understand what's going on - the more people know about what you know, the better
    2. Restructure the project back to the state it was when it last worked (load a copy from version control to another location) and redo the restructuring one small step at a time to find the problen
    3. You refer to Android SDK provided compilers, but from the viewpoint of QtCreator, have you changed any settings to what it offers? Android SDK should not know anything about .pro files (as far as I know). How could QtCreator not find the app's .pro file; its own project file?


    1. I fixed the problem but... it's sort of weird. In the src.pro of my project all I did was
    // previous pro file
    QT += qml quick core network sql widgets xml
    

    to

    QT += core qml quick network sql widgets xml
    QT -= gui
    

    Then androiddeploy finally started building the apk. Perhaps androiddeploy is doing some sort of string search that isn't predicting core being bundled correctly? Beyond me for now. Regardless I don't think anything can save me from reporting :P I found a bug in QGraphicsEffect (QML side, something related with fastblur/opacities that works in 5.5 but not in 5.6) so... I guess it'll be me building two minimal cases.

    1. No need for now

    2. Nope. Most of it is vanilla. I introduced gradle to see if I hit the issue with something (trying to get a reaction), but it didn't work.



  • Nevermind.

    I can't pinpoint the bug, it's too slippery, too fickle to recreate. I created a minimal test case for it but it's been compiling as expected. It still happens in my main project, but I noticed that just deleting the generated .pro.user file that contains your custom settings works... but for some that's not really desirable.

    Gonna try to fish this thing out...



  • Last post (my bad for the triple post)

    Found it... that was really annoying to find. I filed the bug here: https://bugreports.qt.io/browse/QTBUG-51524

    Bug behavior at its best here (video); https://www.youtube.com/watch?v=fSesBz-HXR4&feature=youtu.be


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.