Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Build for Android fails - "dx.jar is missing"?
QtWS25 Last Chance

Build for Android fails - "dx.jar is missing"?

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
3 Posts 3 Posters 1.6k 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.
  • T Offline
    T Offline
    Thomas_Dahl
    wrote on last edited by
    #1

    I am attempting to build QGroundControl for Android following this guide. But I am getting increasingly confused.
    Everything is running perfectly when building to my desktop - but as I change kits to build to Android issues arise.

    The guide specifies Android NDK 19 and the build kit: Android for armeabi-v7a (GCC 4.9, Qt 5.12.6).
    This seems impossible? From what I understand Android NDK stopped supporting GCC as of revision r18.
    So I've been using Clang instead.

    My compile error looks as such;

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':preDexDebug'.
    > java.lang.IllegalStateException: dx.jar is missing
    

    My dx.jar file is found in {Android SDK dir}/build-tools/{version}/lib/
    Cleaning or even deleting and reinstalling everything does not change anything.

    I have tried with combinations of these different versions:

    Ubuntu 20.04.2 LTS
    Qt version 5.12.6
    
    Android SDK Platform-Tools:
    	31.0.3
    
    Android SDK Build-Tools:
    	29.0.2
    	30.0.2
    	31.0.0
    
    Android SDK Platform:
    	19
    	30
    	31
    
    Android NDK:
    	19.2.5345600
    	21.3.6528147
    
    Java JDK:
    	jdk8u302-b08
    	jdk-11.0.12+7
    

    I am now running out of ideas.
    Does anyone know how I could solve this?

    1 Reply Last reply
    1
    • M Offline
      M Offline
      MohsenZahraee
      wrote on last edited by
      #2

      see my stackoverflow answer https://stackoverflow.com/questions/37292269/build-fails-due-to-missing-dx-jar/73565642#73565642

      1 Reply Last reply
      0
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #3

        I built it with JDK 11 + NDK 21 + Qt 5.15.2 without any issue on Ubuntu 18 and 20.

        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