Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › metatypes.json error after upgrade from 3.7 to 3.8

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

    Medrepo

    Hi,

    I have a project that compiles and runs with Felgo 3.7. But with 3.8 I get first the following warning during compilation:

    WARNING: Failure to find: jasca_app_metatypes.json

    And then the error message:

    make: *** No rule to make target ‘jasca_app_metatypes.json’, needed by ‘jasca_app_qmltyperegistrations.cpp’. Stop.

    There are no json files in project tree.

    How can I fix this?

    #24220

    Alex
    Felgo Team

    Hi,

    There are probably some left-over files from a previous build. Did you try a clean build, i.e. deleting the shadow build directory, and running qmake and build afterwards?

    Best,
    Alex from Felgo

    #24221

    Volker

    Hi Alex,

    yes, it was the first I tried but without success. I had a look on generated Makefile and found this json file in the following places:

     

    distdir: FORCE
    @test -d $(DISTDIR) || mkdir -p $(DISTDIR)
    $(COPY_FILE) --parents $(DIST) $(DISTDIR)/
    $(COPY_FILE) --parents jasca_app_metatypes.json $(DISTDIR)/
    $(COPY_FILE) --parents jasca_app_metatypes.json $(DISTDIR)/
    $(COPY_FILE) --parents ../../src/mobile/jasca_app/resources.qrc $(DISTDIR)/
    $(COPY_FILE) --parents ../../src/mobile/jasca_app/main.cpp $(DISTDIR)/
    $(COPY_FILE) --parents ../../../../Felgo/Felgo/android/mkspecs/features/data/dummy.cpp $(DISTDIR)/
    $(COPY_FILE) --parents ../../src/mobile/jasca_app/main.cpp $(DISTDIR)/
    
    ...
    
    jasca_app_qmltyperegistrations.cpp: jasca_app_metatypes.json
    /home/ro/Felgo/Felgo/android/bin/qmltyperegistrar --generate-qmltypes=jasca_app.qmltypes --import-name=eu.medrepo --major-version=1 --minor-version=0 --foreign-types=/home/ro/Felgo/Felgo/android/lib/metatypes/qt5gui_metatypes.json,/home/ro/Felgo/Felgo/android/lib/metatypes/qt5core_metatypes.json -o jasca_app_qmltyperegistrations.cpp jasca_app_metatypes.json
    
    ...
    
    jasca_app.qmltypes: jasca_app_metatypes.json \
    jasca_app_qmltyperegistrations.cpp
    
    

    File jasca_app_qmltyperegistrations.cpp is listed in sources of Makefile, but should be somehow included by Felgo since it’s not mentioned in project file (.pro)

    ####### Files
    
    SOURCES = ../../src/mobile/jasca_app/main.cpp jasca_app_qmltyperegistrations.cpp \
    armeabi-v7a/qrc_resources.cpp
    
    

     

    In .pro file I have only

    SOURCES += main.cpp

    and DISTFILES += with qml files

    #24222

    Volker
    #24223

    Volker

    If I comment the following line out:

    CONFIG += qmltypes

    I can compile, but app crashes on engine load

    engine.load(QUrl(felgo.mainQmlFileName()));

     

    #24243

    Alex
    Felgo Team

    Hi,

    Thanks for the additional input.

    As this is something project-specific, can you please send a quick note to support@felgo.com so that we can have a closer look to solve the issue?

    Thanks,
    Alex from Felgo

    #24247

    Volker

    Hi Alex,

    removing

    CONFIG += qmltypes

    solved the issue and crash was because of missing custom QML plugin deployment after upgrade. We install our QML plugin inside Felgo directory. I would prefer to install it in application directory, something like this:

    QQmlApplicationEngine engine;
    engine.addImportPath("./plugins");

    But on Android the apllication resides under /libs inside APK together with other libraries, so I have no idea how I can deploy qml plugin in this case. I will create a new topic about it. It would be greate if you could have a look on it.

     

    #24687

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

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded