Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Installing AVDs

Installing AVDs

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 3 Posters 3.5k 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.
  • G Offline
    G Offline
    gabor53
    wrote on 11 Jul 2018, 22:11 last edited by
    #1

    Hi,

    I am running Qt Creator 4.6.1 (based on Qt 5.11.0) on Windows 10. I also installed:

    • JDK 1.8.0_171

    • SDK

    • NDK android- ndk-r17b.
      The installation is correct; I have a green check mark before each item. When I try to install an AVD I get Exception in thread "main" java.lang.NoClassDefFoundError. How can I fix this problem?
      Thank you

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 12 Jul 2018, 05:39 last edited by
      #2

      Does the exception also happen when you run AVD manager separately (not from within Qt Creator)?

      Please check - maybe modern SDK/NDK requires Java 1.9?

      (Z(:^

      G 1 Reply Last reply 12 Jul 2018, 17:41
      0
      • S sierdzio
        12 Jul 2018, 05:39

        Does the exception also happen when you run AVD manager separately (not from within Qt Creator)?

        Please check - maybe modern SDK/NDK requires Java 1.9?

        G Offline
        G Offline
        gabor53
        wrote on 12 Jul 2018, 17:41 last edited by
        #3

        @sierdzio
        How can I run the AVD manager separately? My .Android/AVD folder is empty and there is nothing I can run.

        S 1 Reply Last reply 12 Jul 2018, 19:18
        0
        • G gabor53
          12 Jul 2018, 17:41

          @sierdzio
          How can I run the AVD manager separately? My .Android/AVD folder is empty and there is nothing I can run.

          S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 12 Jul 2018, 19:18 last edited by
          #4

          @gabor53 said in Installing AVDs:

          @sierdzio
          How can I run the AVD manager separately? My .Android/AVD folder is empty and there is nothing I can run.

          Go to: <Android SDK directory>/tools and there run ./android avd. On Windows it might be something like android.exe avd, not sure.

          (Z(:^

          G 1 Reply Last reply 12 Jul 2018, 19:50
          0
          • S sierdzio
            12 Jul 2018, 19:18

            @gabor53 said in Installing AVDs:

            @sierdzio
            How can I run the AVD manager separately? My .Android/AVD folder is empty and there is nothing I can run.

            Go to: <Android SDK directory>/tools and there run ./android avd. On Windows it might be something like android.exe avd, not sure.

            G Offline
            G Offline
            gabor53
            wrote on 12 Jul 2018, 19:50 last edited by gabor53 7 Dec 2018, 19:55
            #5

            @sierdzio
            I went to the directory you recommended. This This is what was there. There is nothing I can actually run. The applications don't allow any kind of interaction.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 12 Jul 2018, 20:02 last edited by
              #6

              You need to open a command line there. Or add arguments (the avd) to properties of the android.bat file (right there in the middle of your pic) and then double click it.

              (Z(:^

              G 1 Reply Last reply 13 Jul 2018, 13:13
              1
              • S sierdzio
                12 Jul 2018, 20:02

                You need to open a command line there. Or add arguments (the avd) to properties of the android.bat file (right there in the middle of your pic) and then double click it.

                G Offline
                G Offline
                gabor53
                wrote on 13 Jul 2018, 13:13 last edited by
                #7

                @sierdzio
                I get the same error message no matter what command I use (for example update or list AVDs.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sierdzio
                  Moderators
                  wrote on 13 Jul 2018, 13:40 last edited by
                  #8

                  OK, at least that means it is not Qt bug, but something in Android SDK. Make sure your SDK installtion is corrects and that you have correct Java JDK version.

                  (Z(:^

                  G 1 Reply Last reply 13 Jul 2018, 14:36
                  0
                  • S sierdzio
                    13 Jul 2018, 13:40

                    OK, at least that means it is not Qt bug, but something in Android SDK. Make sure your SDK installtion is corrects and that you have correct Java JDK version.

                    G Offline
                    G Offline
                    gabor53
                    wrote on 13 Jul 2018, 14:36 last edited by
                    #9

                    @sierdzio
                    Which versions can I use together?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sierdzio
                      Moderators
                      wrote on 13 Jul 2018, 18:09 last edited by sierdzio
                      #10

                      No idea, I'm still on some mighty old SDK/NDK/Java combo and I'm afraid to update it. Every time I try, something breaks ;-)

                      Looking at their Wiki it seems that they recommend OpenJDK 1.8, so the same stuff you have already (unless you are using Oracle Java then it might cause issues).

                      Have you tried reinstalling the SDK?

                      (Z(:^

                      G 1 Reply Last reply 13 Jul 2018, 20:18
                      0
                      • S sierdzio
                        13 Jul 2018, 18:09

                        No idea, I'm still on some mighty old SDK/NDK/Java combo and I'm afraid to update it. Every time I try, something breaks ;-)

                        Looking at their Wiki it seems that they recommend OpenJDK 1.8, so the same stuff you have already (unless you are using Oracle Java then it might cause issues).

                        Have you tried reinstalling the SDK?

                        G Offline
                        G Offline
                        gabor53
                        wrote on 13 Jul 2018, 20:18 last edited by
                        #11

                        @sierdzio
                        I am trying to reinstall, but it is possible to get the SDK only without Android Studio?

                        S 1 Reply Last reply 13 Jul 2018, 20:46
                        0
                        • G gabor53
                          13 Jul 2018, 20:18

                          @sierdzio
                          I am trying to reinstall, but it is possible to get the SDK only without Android Studio?

                          S Offline
                          S Offline
                          sierdzio
                          Moderators
                          wrote on 13 Jul 2018, 20:46 last edited by
                          #12

                          @gabor53 said in Installing AVDs:

                          I am trying to reinstall, but it is possible to get the SDK only without Android Studio?

                          Yes, see https://stackoverflow.com/questions/27043522/where-can-i-download-an-older-version-of-the-android-sdk

                          (Z(:^

                          G 1 Reply Last reply 14 Jul 2018, 20:51
                          0
                          • S sierdzio
                            13 Jul 2018, 20:46

                            @gabor53 said in Installing AVDs:

                            I am trying to reinstall, but it is possible to get the SDK only without Android Studio?

                            Yes, see https://stackoverflow.com/questions/27043522/where-can-i-download-an-older-version-of-the-android-sdk

                            G Offline
                            G Offline
                            gabor53
                            wrote on 14 Jul 2018, 20:51 last edited by gabor53
                            #13

                            @sierdzio
                            The older versions don't work.
                            I followed the instructions on this page to set the JAVA_HOME.
                            After that I followed these instructions to create AVDs.
                            At this time I didn't have any error messages (neither using the command line nor using Qt > Options > Devices > AVD Manager.
                            If I use the command line theAVD is created, because there are no errormessages. The question is how to find the created AVDs and how to add them to Qt Devices? The AVD manager's add function is thinking for a while then exit without any messages and without adding the AVD.

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              sierdzio
                              Moderators
                              wrote on 15 Jul 2018, 06:51 last edited by
                              #14

                              I don't know, something is definitely broken in your SDK installation. I don't know how to fix it, and I have not ever seen this error myself.

                              (Z(:^

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                gabor53
                                wrote on 16 Jul 2018, 20:22 last edited by
                                #15

                                This solved the problems for me:
                                I downloaded and installed AVD Manager.
                                It allows me to create AVDs and Qt can read them and place them under the AVD manager tab in Devices. The only problem is that the Target field in AVD manager is grayed out therefore I can't enter anything in that field. Without the target field Qt doesn't want to use the AVD. Is there any way to enter Target?

                                1 Reply Last reply
                                0
                                • D Offline
                                  D Offline
                                  Diego Luna
                                  wrote on 21 Apr 2020, 08:05 last edited by
                                  #16

                                  I know this question is really old, but I like to left this for someone that might face the same problem. The most likely cause of this error is that the "java.exe" in the PATH it's from a JDK or JRE more recent than 1.8. A JDK or JRE 1.8 is required, the solution is to uninstall the JDK or JRE present and install the version1.8 of the JDK, or if like me, you can't do that, install the version1.8 of the JDK in another location and modify the PATH previous to launch QtCreator, something like: SET "PATH=path\to\jdk1.8;%PATH%".

                                  1 Reply Last reply
                                  1

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved