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. Simple apps not running on android emulator - misconfigured system?
Forum Updated to NodeBB v4.3 + New Features

Simple apps not running on android emulator - misconfigured system?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 1.1k 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.
  • A Offline
    A Offline
    aethelnorn
    wrote on last edited by aethelnorn
    #1

    Hi all,

    Having sorted out my libraries (on another thread) I am now going to develop the app that uses them. But I am having problems. My best guess is that my system is misconfigured somehow, or that I have totally misunderstood which android stuff I should be running....... Since I am new to this tooling either is quite likely.

    Edit: I can run the example apps fine eg SystemDialogs.

    My system:
    Qt 5.12.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 10.0.0 (clang-1000.11.45.2) (Apple)) on "cocoa"
    OS: macOS 10.14 [darwin version 18.2.0]
    Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 RTM HLE

    What I did:

    • create new project (either widget or quick app), use defaults for everything
    • select all kits
    • run on Android simulator (Nexus 5 using Android for x86)

    This builds fine but fails in android with lots of logcat in red. It starts with warnings about unsupported flags:
    W linker : Warning: "/data/app/org.qtproject.example.QuickApp-b8a-8UuY6CJ30fwgznu8pQ==/lib/x86/libQt5Network.so" has unsupported flags DT_FLAGS_1=0x80 (ignoring unsupported flags)

    And rapidli escalates to NPE:
    W System.err: java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState; (declaration of 'android.graphics.drawable.RotateDrawable$RotateState' appears in /system/framework/framework.jar)
    W System.err: at java.lang.Class.getDeclaredField(Native Method)
    W System.err: at org.qtproject.qt5.android.ExtractStyle.getAccessibleField(ExtractStyle.java:404)
    W System.err: at org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:721)

    sierdzioS 1 Reply Last reply
    0
    • A aethelnorn

      Hi all,

      Having sorted out my libraries (on another thread) I am now going to develop the app that uses them. But I am having problems. My best guess is that my system is misconfigured somehow, or that I have totally misunderstood which android stuff I should be running....... Since I am new to this tooling either is quite likely.

      Edit: I can run the example apps fine eg SystemDialogs.

      My system:
      Qt 5.12.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 10.0.0 (clang-1000.11.45.2) (Apple)) on "cocoa"
      OS: macOS 10.14 [darwin version 18.2.0]
      Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 RTM HLE

      What I did:

      • create new project (either widget or quick app), use defaults for everything
      • select all kits
      • run on Android simulator (Nexus 5 using Android for x86)

      This builds fine but fails in android with lots of logcat in red. It starts with warnings about unsupported flags:
      W linker : Warning: "/data/app/org.qtproject.example.QuickApp-b8a-8UuY6CJ30fwgznu8pQ==/lib/x86/libQt5Network.so" has unsupported flags DT_FLAGS_1=0x80 (ignoring unsupported flags)

      And rapidli escalates to NPE:
      W System.err: java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState; (declaration of 'android.graphics.drawable.RotateDrawable$RotateState' appears in /system/framework/framework.jar)
      W System.err: at java.lang.Class.getDeclaredField(Native Method)
      W System.err: at org.qtproject.qt5.android.ExtractStyle.getAccessibleField(ExtractStyle.java:404)
      W System.err: at org.qtproject.qt5.android.ExtractStyle.getRotateDrawable(ExtractStyle.java:721)

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @aethelnorn said in Simple apps not running on android emulator - misconfigured system?:

      This builds fine but fails in android with lots of logcat in red. It starts with warnings about unsupported flags:
      W linker : Warning: "/data/app/org.qtproject.example.QuickApp-b8a-8UuY6CJ30fwgznu8pQ==/lib/x86/libQt5Network.so" has unsupported flags DT_FLAGS_1=0x80 (ignoring unsupported flags)

      This is normal - you can safely ignore these warnings.

      And rapidli escalates to NPE:
      W System.err: java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState;

      Is your simulator running Android 9? If yes then I think this is a known bug. Try targeting lower API and running on Android 8.

      (Z(:^

      A 1 Reply Last reply
      2
      • sierdzioS sierdzio

        @aethelnorn said in Simple apps not running on android emulator - misconfigured system?:

        This builds fine but fails in android with lots of logcat in red. It starts with warnings about unsupported flags:
        W linker : Warning: "/data/app/org.qtproject.example.QuickApp-b8a-8UuY6CJ30fwgznu8pQ==/lib/x86/libQt5Network.so" has unsupported flags DT_FLAGS_1=0x80 (ignoring unsupported flags)

        This is normal - you can safely ignore these warnings.

        And rapidli escalates to NPE:
        W System.err: java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState;

        Is your simulator running Android 9? If yes then I think this is a known bug. Try targeting lower API and running on Android 8.

        A Offline
        A Offline
        aethelnorn
        wrote on last edited by aethelnorn
        #3

        @sierdzio OK, thanks.

        I tried again this morning and it all worked - without me doing anything. Obviously the magic of 'turn it off and on' is alive and well.

        I will keep an eye out for Android 9 problems.

        At the moment I have not found where in Qt to configure the android settings - I am doing a quick first 'feasibility study' -

        • can I compile my c libraries (tick, yes),
        • can I create a simple cross-platform app (tick, yes)
        • can I call my library code from a simple cross-platform app - that is the next task. And likely the difficult step.

        Once I have all these I will delve into the details of configuring and optimising but for now these would be a distraction unless, of course, they are vital to getting stuff working. So far I have been impressed with what Qt tooling does for me, and with the help I have had on these forums.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Yes you can link C/C++ libraries to Qt apps. That works on all platforms, although on some it's easier and on some harder (not Qt's fault).

          (Z(:^

          A 1 Reply Last reply
          1
          • sierdzioS sierdzio

            Yes you can link C/C++ libraries to Qt apps. That works on all platforms, although on some it's easier and on some harder (not Qt's fault).

            A Offline
            A Offline
            aethelnorn
            wrote on last edited by
            #5

            @sierdzio Thanks. I programmed in C and C++ a couple of decades ago - I am hoping it will come back to me when I start.

            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