Build for Android fails - "dx.jar is missing"?
-
wrote on 27 Aug 2021, 09:15 last edited by
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? -
wrote on 1 Sept 2022, 08:26 last edited by
see my stackoverflow answer https://stackoverflow.com/questions/37292269/build-fails-due-to-missing-dx-jar/73565642#73565642
-
wrote on 1 Sept 2022, 16:22 last edited by JoeCFD 9 Jan 2022, 16:25
I built it with JDK 11 + NDK 21 + Qt 5.15.2 without any issue on Ubuntu 18 and 20.