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. Android build works on Qt Creator, but won't work on command-line

Android build works on Qt Creator, but won't work on command-line

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 212 Views
  • 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.
  • 1 Offline
    1 Offline
    1XU7
    wrote on 3 Dec 2024, 02:55 last edited by
    #1

    Hi there..
    In Qt Creator, i have created a Qt Widget application for Android Intel and ARM kits.

    The following command works fine in Qt Creator:

    "C:\F\Qt\6.6.3\mingw_64\bin\androiddeployqt.exe" --input C:/P/ND7/build/debug_intel/android-ND7-deployment-settings.json --output C:/P/ND7/build/debug_intel/android-build --android-platform android-33 --jdk C:/F/Qt/Tools/jdk-17.0.13+11 --gradle
    

    APK BUIKD SUCCESS

    ...but wont to work if i put the same whole command in windows terminal, it says:

    "ERROR:C:\P\ND7\build\debug_intel\android-build\build\intermediates\javac\debug\classes\org\qtproject\qt\android\bindings\QtLoader$1.class: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
    ERROR:C:\P\ND7\build\debug_intel\android-build\build\intermediates\javac\debug\c"

    What could it be?
    Thanks.

    J 1 Reply Last reply 3 Dec 2024, 06:18
    0
    • 1 1XU7
      3 Dec 2024, 02:55

      Hi there..
      In Qt Creator, i have created a Qt Widget application for Android Intel and ARM kits.

      The following command works fine in Qt Creator:

      "C:\F\Qt\6.6.3\mingw_64\bin\androiddeployqt.exe" --input C:/P/ND7/build/debug_intel/android-ND7-deployment-settings.json --output C:/P/ND7/build/debug_intel/android-build --android-platform android-33 --jdk C:/F/Qt/Tools/jdk-17.0.13+11 --gradle
      

      APK BUIKD SUCCESS

      ...but wont to work if i put the same whole command in windows terminal, it says:

      "ERROR:C:\P\ND7\build\debug_intel\android-build\build\intermediates\javac\debug\classes\org\qtproject\qt\android\bindings\QtLoader$1.class: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
      ERROR:C:\P\ND7\build\debug_intel\android-build\build\intermediates\javac\debug\c"

      What could it be?
      Thanks.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 3 Dec 2024, 06:18 last edited by
      #2

      @1XU7 On Windows, if you install Qt you will get a preconfigured terminal in start menu - try to use that one to build.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • 1 Offline
        1 Offline
        1XU7
        wrote on 4 Dec 2024, 01:04 last edited by
        #3

        Hi @jsulm thanks for answering...
        the only shortcut i have for qt environment is Qt 6.6.3 MinGW (11.2.0) 64 bits... i tried with it.. but still cant build for Android... i think it should be somewhere or somehow the same shortcut but for ARM and Intel Kits for Android.... that could have more sense...

        1 Reply Last reply
        0

        1/3

        3 Dec 2024, 02:55

        • Login

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