-2

I wanted to start android developing with QT, but ran into a problem. Pic related

Qt version is 5.12.12 Pic related

Installed offline, didnt turn off anything in installation.

Im running standart project, hello world, here is errors Pic related

The thing is - emulator starts, but doesnt launch project.

Found on qt forum, that I need to downgrade java to 1.8 or lower, the thing is - on picture you see already downgraded java. I started with 1.9, went to 1.8 and now on 1.6, nothing changes, exept error changing mentioned java version. Probably will try even lower one, but hopes are low.

Elikill58
  • 4,050
  • 24
  • 23
  • 45
  • Well, I rolled back to java 14, didnt change any – VoiceShifter Mar 15 '23 at 00:08
  • Downvote can come from the multiple things named. You mention emulators but it doesn't seems to be the subject, and no we don't see you downgrade java, only that you tried jdk 16. If your question is beeing closed and you think it's wrong, and you want to understand why your question specially, there is [meta] for this – Elikill58 Mar 15 '23 at 12:22
  • Thanks for reply, Im surely dumb and used wrong words, Its seems to be true, that I only changed JDK. Is changing a enviroment variable considering changing Java? Since I cant find a way to download official java installer after oracle policy changes. Or using openJDK is a way here? – VoiceShifter Mar 15 '23 at 15:09
  • OpenJDK should be the solution, and "changing JDK" is very large things. Also, even if we could understand, the picture is different from what you said ^^ ELse, I suggest you to upgrade gradle – Elikill58 Mar 15 '23 at 15:40
  • Okay, I did things, tell me If I did wrong thing. I downloaded grandle separately(I believe it was installed with android studio before), added to environment variables and such, I downloaded OpenJDK and choose it in Qt in JDK location, deleted every java I had(there was 7 and 8, so I first uninstalled 8, tried with 7, no changes), ran into same problem, changed to another version of openJDK, same. Installed java back, nothing changes. Sorry if Im doing everything wrong, but can you tell if this is what you ment? – VoiceShifter Mar 15 '23 at 20:58
  • Does this answer your question? [Gradle: Could not determine java version from '11.0.2'](https://stackoverflow.com/questions/54358107/gradle-could-not-determine-java-version-from-11-0-2) I was meaning to upgrade both, and use Java 16 but with latest version of gradle, upgraded separatly of Qt (or downloaded by Qt if it can) – Elikill58 Mar 16 '23 at 07:25

1 Answers1

0

Oh god I didnt expect this rabit hole to be so deep. First thing - Thanks to Elikill58, he's a god. I dont yet know if JDK change any-thing. I managed to start project on java 8 update 361, Eclipse Foundation\jdk-16.0.2.7-hotspot, but I guess it has nothing to do with java or JDK, untill its not 10 years old. What I did:

  • Download and install Gradle

  • Create a new project

  • Run it once

  • Go to generated folder->android.build->gradle.properties.

  • Here what you will see

In my case - its 7.4.2, I changed it to this, it was 3.2.0. You also need to go to android-build\gradle\wrapper->gradle-wrapper.properties and change it to gradle you install (cmd - "gradle --version"). Those versions may not be the same, its ok. And after that I managed to lauch a project. I dont know, maybe you could run gradle init in project folder, will check this later, untill then - this is a working methon on QT 5.12.12

You may read Gradle: Could not determine java version from '11.0.2' article, it didnt help me, but it gave me right direction.

Keep in mind - before that I had Android Studio installed and I was thinking, that it installed everything for me.