Android: Build failed with exception. Could not determine Java version from '11.0.10'
-
wrote on 14 Mar 2021, 20:33 last edited by
@SGaist thanks for the reply! Qt 5.15.2
-
wrote on 16 Mar 2021, 18:07 last edited by
Anything above Java 8 isn't supported by Android atm.
-
wrote on 20 Mar 2021, 04:18 last edited by
@morte thanks for the reply!
I have tried the official releases of Java: 11.0.10 and 8u281 as well as AdoptOpenJDK 8.0.282.8 and 11.0.10.9
Think I need to downgrade even further?
-
wrote on 21 Mar 2021, 21:17 last edited by
It works with AdoptOpenJDK 8.0.282.8, should also work with other Java 7/8 JDKs.
What is build output with Java 8? -
It works with AdoptOpenJDK 8.0.282.8, should also work with other Java 7/8 JDKs.
What is build output with Java 8?wrote on 24 Mar 2021, 16:22 last edited byThank you for the help!
-
wrote on 24 Mar 2021, 19:07 last edited by morte
Maybe something wrong with 'Compilers', it sometimes become broken after replacing JDK and Android SDK, NDK.
Working configuration looks something like that (don't mind NDK version on screenshot - 21.4, it also works with 21.3):
If problem with 'Compilers' and Re-detcting won't help, if you don't have any valuable settings, you can delete whole Qt Creator settings, located at C:\Users%USERNAME%\AppData\Roaming\QtProject or only "toolchains.xml" file. Qt Creator recreates those on startup.
-
wrote on 3 Jan 2022, 19:52 last edited by
I'd like to know if anyone has a follow up on this. I also have this problem but only on projects built with QML. Projects built with QWidgets and C++ build beautifully on Android, Armbian and Windows Desktop without no changes to the underlying code.
In addition I see this warning the the Android Build Settings underneath the Build directory:
Could not parse Makefile. The build will be overwritten.
I've looked at the Makefile and can't see the problem.
Sorry to dig up an old topic but this one exactly describes my problem for QML builds.
-
wrote on 31 Jan 2022, 04:08 last edited by
I'm having this problem too. It only happens on my "Release" build configurations. I don't get it when I configure for "Debug".
Has anyone else figured out how to resolve this?
-
I'm having this problem too. It only happens on my "Release" build configurations. I don't get it when I configure for "Debug".
Has anyone else figured out how to resolve this?
-
It works with AdoptOpenJDK 8.0.282.8, should also work with other Java 7/8 JDKs.
What is build output with Java 8?wrote on 27 Sept 2024, 11:30 last edited by@morte This solution helped me.
I downgraded to 8 and everything compiled.