Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can't create main activity after upgrading to Qt 5.3.2
Forum Updated to NodeBB v4.3 + New Features

Can't create main activity after upgrading to Qt 5.3.2

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 5 Posters 4.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    ktaggart
    wrote on last edited by
    #1

    Hello,

    The project I am working on was started with Qt 5.2 (Android app/Linux 64-bit dev host). Upgrading to the various releases hasn't been an issue until today.

    After upgrading to Qt 5.3.2, my app builds fine, but during deployment to the Android target, I get the following error/output:
    E/Qt (16812): Can't create main activity
    E/Qt (16812): java.io.FileNotFoundException: --Added-by-androiddeployqt--/qml/QtQuick/Controls/Styles/Desktop/BusyIndicatorStyle.qml
    E/Qt (16812): at android.content.res.AssetManager.openAsset(Native Method)
    E/Qt (16812): at android.content.res.AssetManager.open(AssetManager.java:316)
    E/Qt (16812): at android.content.res.AssetManager.open(AssetManager.java:290)
    E/Qt (16812): at org.qtproject.qt5.android.bindings.QtActivity.copyAsset(QtActivity.java:397)
    E/Qt (16812): at org.qtproject.qt5.android.bindings.QtActivity.extractBundledPluginsAndImports(QtActivity.java:506)
    E/Qt (16812): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:585)
    E/Qt (16812): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:880)
    E/Qt (16812): at android.app.Activity.performCreate(Activity.java:5231)
    E/Qt (16812): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    E/Qt (16812): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
    E/Qt (16812): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
    E/Qt (16812): at android.app.ActivityThread.access$800(ActivityThread.java:135)
    E/Qt (16812): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    E/Qt (16812): at android.os.Handler.dispatchMessage(Handler.java:102)
    E/Qt (16812): at android.os.Looper.loop(Looper.java:136)
    E/Qt (16812): at android.app.ActivityThread.main(ActivityThread.java:5017)
    E/Qt (16812): at java.lang.reflect.Method.invokeNative(Native Method)
    E/Qt (16812): at java.lang.reflect.Method.invoke(Method.java:515)
    E/Qt (16812): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    E/Qt (16812): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    E/Qt (16812): at dalvik.system.NativeStart.main(Native Method)

    This occurs with all my projects, but the samples I've tried all work.

    Has there been a change that requires me to update my code?

    I don't see any obvious differences in the sample code to the way I am doing things.

    Switching back to Qt 5.3.1 allows my projects to build/deploy perfectly.

    Any ideas?

    Thx,

    -k

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Brexis
      wrote on last edited by
      #2

      You are using a BusyIndicatorStyle object and androiddeployqt reference the wrong file. It's trying to use the desktop file. Can you paste your code witch include your custom busyindicator?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        ktaggart
        wrote on last edited by
        #3

        That's odd, as I am not using any busy indicator at all - custom or otherwise.

        I am not sure what code to post (or what I can post as it is proprietary) and there are several thousand lines of code, spanning multiple projects (main project and test code - all exhibit the same problem).

        As this only happens when I try to deploy using 5.3.2, but all work fine with 5.3.1, I would think my code is fine, excepting any required changes needed for the new version... are there any?

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vivelu
          wrote on last edited by
          #4

          Hey. I have the same problem. Everything is working fine with Qt-5.3.1. I just wanted to upgrade to Qt-5.3.2, for no specific reason. I have compiled both of them from source. I switched the same way that with all previous versions, just exported PATH to have new bin/qmake.

          Now, when I start the installed Qt-android-app, it tries to use Desktop BusyIndicatorStyle.qml:

          @java.io.FileNotFoundException: —Added-by-androiddeployqt—/qml/QtQuick/Controls/Styles/Desktop/BusyIndicatorStyle.qml@

          For obvious reasons, there is no such file. But I don't why it is trying to use it.

          Edit: To make it clear, I have never used any BusyIndicator or that kind of style in my project.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vivelu
            wrote on last edited by
            #5

            It seems, that Qt-5.4_alpha does not have this problem.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              ktaggart
              wrote on last edited by
              #6

              I found the problem(s), and they all stem from androiddeployqt, which is severely buggy.

              When deploying an Android app, androiddeployqt adds a whole bunch of useless crap to the project's android-build/res/values/libs.xml file, including a lot of desktop qml files. The irony is that the "missing" file in question actually exists right where the error message insists it isn't, in android-build/--Added-by-androiddeployqt--/qml/QtQuick/Controls/Styles/Desktop/.

              Commenting out all the unnecessary files (or even just the one it complains about) breaks the build with random errors about QtWebKit/plugins.qmltypes.

              I hope they finally get around to fixing this in the next release - that and the broken support for custom plugin types with androiddeployqt.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                AndrewDK
                wrote on last edited by
                #7

                Have a similar problem in 5.4.1

                E/Qt (18743): Can't create main activity
                E/Qt (18743): java.io.FileNotFoundException: --Added-by-androiddeployqt--/qml/QtQuick/Controls/Private/CalendarHeaderModel.qml

                1 Reply Last reply
                0
                • AteefA Offline
                  AteefA Offline
                  Ateef
                  wrote on last edited by
                  #8

                  Had a similar problem, the solution was the put build directory in the top of file system. lengthy paths seem to upset androiddeployqt.
                  http://stackoverflow.com/questions/30924512/deploying-to-android-results-in-file-not-found-after-adding-qtquick-controls

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved