How to create a virtual Android device



  • Hi,
    I installed these:

    Android Studio
    jdk-8u121-windows-x64
    qt-opensource-windows-x86-android-5.8.0

    and downloaded and extracted apache-ant-1.10.1-bin.

    Then I went to for a project using this example named Andapp1. Then I was recommended to first follow this link.
    OK, I set the Android tab this way.

    So, I tried to run my app, Andapp1 project, on Qt Creator, but it needed an Android virtual device and it's logical!

    Then I was suggested to follow this link —for an emulator, but it's not clear how to!

    It is my Android SDK Manager (after running).

    I can't figure out how I can using that Doc create and connect an Android virtual device to the Qt Creator to be able to run the Andapp1 Android app!!



  • @tomy said in How to create a virtual Android device:

    Then I was suggested to follow this link —for an emulator, but it's not clear how to!

    Go to your catalog: ...\Android\sdk
    there should be: SDK Manager.exe
    select: Android 7.1.1(API25) -> and click install packages

    Then run (from the sam catalog) AVD Manager.exe, here is where AVD can be created.
    Click 'Create..' button and provide settings for your AVD.
    After that compile and run your project. Automatically (after run==deploy) window with your AVD that you has just crated should pop up. Choose the AVD and emulator should start.



  • @ginar44

    Go to your catalog: ...\Android\sdk
    there should be: SDK Manager.exe
    select: Android 7.1.1(API25) -> and click install packages

    It's previously installed: http://imgur.com/a/fgYUO

    Then run (from the sam catalog) AVD Manager.exe, here is where AVD can be created.

    I didn't understand this. that is. do you mean to run that SDK Manager.exe again?

    Click 'Create..' button and provide settings for your AVD.

    Using Android SDK Manager > Tools > Manage AVDs > Create I tried to create an AVD but it needs images as. See this please.

    After that compile and run your project. Automatically (after run==deploy) window with your AVD that you has just crated should pop up. Choose the AVD and emulator should start.



  • I don't see you have installed any image. Look at mine setting:
    http://imgur.com/a/Zpzwx



  • The problem is that there is no way to install them apparently.

    And also when I run Android Studio I don't have Android > SDK Manager there!! Please look.



  • I'm really confused. What is the problem? how those million persons use these tools for programming?
    Why can't I find a solution for those odd problems?! :( :( :(



  • The problem is that I cannot install the required packages. :(



  • Look at this guy install that stuff: https://www.youtube.com/watch?v=k2HUwxggRq4

    And mybe change sdk. I dont use any installation.exe ( no android studio) only .zip android-sdk_r24.4.1-windows
    (the first)
    https://www.google.pl/search?q=android-sdk_r24.4.1-windows&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=hminWKXFHaLi8AfvgZz4DA



  • It seems that the problem is of the SDK and AVD Managers. I hope so.
    I'm downloading android-sdk_r24.4.1-windows.zip.
    Then I follow the steps mentioned in video.



  • I downloaded that .zip. It contains these and the Tools folder contains these. When Run the SDK Manager it shows almost nothing.
    what is the problem this time? :(

    What does that .zip show for you? Why mine shows nothing!



  • This is the content of the SDK folder created when installing Android Studio 2.2.3. Its size is about 4.84GB. That is, It is bigger than any other SDK Tools.
    But I don't know why it doesn't install all packages it includes!!



  • Your problem is that SDK Manager doesn't show you all packages.
    Try open SDK Manager.exe as an administrator.
    Seems like known issue
    http://stackoverflow.com/questions/11314359/android-sdk-manager-does-not-show-packages-to-be-installed



  • Thanks. I read it carefully.
    Again no success! :-(

    I guess the problem is of the the proxy settings. Mine is like this.



  • I uninstalled everything and started the work again this time this way:
    On my Windows 7 x64, I installed:

    • qt-opensource-windows-x86-android-5.7.0 (I thought the problem may be of 5.8 so installed this time 5.7)
    • android-studio-bundle-145.3537739-windows (Android Studio 2.2.3)
    • android-ndk-r13b
    • apache-ant-1.10.1
    • jdk-8u121-windows-x64

    And after setting the Android Tab of Qt Creator 5.7, I ran SDK Manager using its path:C:\Users\CS\AppData\Local\Android\sdk

    Result: http://imgur.com/a/CLZZu

    Once again, this time using a Windows 10 x64 virtual machine, I installed:

    • qt-opensource-windows-x86-android-5.8.0
    • android-studio-bundle-145.3537739-windows (Android Studio 2.2.3)
    • android-ndk-r13b
    • apache-ant-1.10.1
    • jdk-8u121-windows-x64

    And after setting the Android Tab of Qt Creator 5.8, I ran SDK Manager using its path: C:\Users\CS\AppData\Local\Android\sdk

    Result: http://imgur.com/a/WAuCe

    They are unfortunately the same.
    So the problem is not of the operating system.

    I don't know if I had gone the way wrongly somewhere. But it's so strange.
    I think there maybe a problem with Android Studio 2.2.3. Probably I should test a lower version, 2.2.2 for creating an AVD. :-( :-( :-(



  • @ginar44
    Hi Ginar,

    I could finally handle the problem, although not completely.
    Thanks for your help up to here.

    Please see the screenshot below. I want to know, what stuffs/updates do I need to install please?

    http://imgur.com/a/Iru1N


  • Moderators

    @tomy In another thread I already said that you should check the "Show Package Details" check box in the bottom right corner. Did you try? You need to check it then you will see Android images you need for emulator.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.