Android app doesn't run
-
-
@mzimmers said in Android app doesn't run:
Do I need to dig up an earlier version of the SDK now?
That's a bit tricky:
- The Latest version of the SDK Command-Line tools (v11+) requires JDK 17 now. In contrast, v10 of the Tools can work with JDK 11.
- Qt Creator expects you to use the SDK Manager to install the "Latest" version of the tools. So if you've upgrade those tools, you're expected to use JDK 17 too.
And, to @JKSH's suggestion, this is without modifying any of the files in my android directory.
Hmm... that's weird. Sorry, I don't know if it's related to JDK 17 or not. (I haven't upgraded so I'm still using JDK 11 + SDK Command-Line Tools v10)
-
-
@mzimmers I'm using JDK 17 for Qt 5.15.15 and 6.6
-
The error message indicates that you are trying to run a Java class file compiled with a higher version of the Java compiler than the version of the Java Runtime Environment (JRE) you have installed.
In this case:
Class file version 61.0 corresponds to Java 17. Class file version 55.0 corresponds to Java 11.
==============================================================
Your installation is messed up. -
@JoeCFD said in Android app doesn't run:
Your installation is messed up.
Well, that's an understatement. From a terminal, I get this:
C:\Users\michael.zimmers>java -version openjdk version "21.0.1" 2023-10-17 LTS OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
Is this not the same JRE instance that Creator is trying to use?
-
@JoeCFD said in Android app doesn't run:
Wait: you have JDK 21?
I have JDK 11, 17 and 21. I just don't know which one to use in my JDK/SDK/NDK/tools/JRE cocktail.
-
@mzimmers I guess you can not have all of them. Remove 17 and 21 and SDK. Reinstall SDK if you use Java 11 which is recommended by Android for Andorid 13.
@ekkescorner wrote he is ok with 17. I have not tried it. You can try it out as well.
-
@JoeCFD but according to JKSH's post this is going to create a mismatch.
-
-
An update: I was able to install my application from the command line (using adb.exe). So, there's nothing wrong with my .apk file; it appears the problem is in Creator 12.0.1 (or the way I'm using it).
51/87