Running an AVD from Android Studio on Ubuntu 17.04
Asked Answered
M

1

11

I am trying to run an app from Android Studio but the AVD does not start. It hangs on 'Waiting for target device to come online' although the emulator loading part finishes (the emulator does not open but the progress bar completes).

Output from terminal:

    brian@brian-desktop:~/Downloads/android-studio/bin$ ./studio.sh
Looking in classpath from com.intellij.util.lang.UrlClassLoader@6d5380c2 for /com/sun/jna/linux-x86-64/libjnidispatch.so
Found library resource at jar:file:/home/brian/Downloads/android-studio/lib/jna.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
Trying /home/brian/.AndroidStudio2.3/system/tmp/jna3898264938984980367.tmp
Found jnidispatch at /home/brian/.AndroidStudio2.3/system/tmp/jna3898264938984980367.tmp
[   6896]   WARN - dea.updater.SdkComponentSource - File /home/brian/.android/repositories.cfg could not be loaded. 
Downloading https://services.gradle.org/distributions/gradle-3.3-all.zip
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /home/brian/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip to /home/brian/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9
Set executable permissions for: /home/brian/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3/bin/gradle
[ 349239]   WARN - .workspace.NdkWorkspaceManager - NDK support for project 'Kryptomate' is disabled because it's not a valid Android project 
Looking for library 'libnotify.so.4'
Adding paths from jna.library.path: null
Trying libnotify.so.4
Found library 'libnotify.so.4' at libnotify.so.4
[ 403253]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: ExampleUnitTest.java 
[ 403254]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: gradle.properties 
[ 403254]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: activity_item_detail.xml 
[ 403254]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: item_list.xml 
[ 645318]   WARN -                    #InstantRun - Instant Run enabled, but not doing an instant run build since: API_TOO_LOW_FOR_INSTANT_RUN 
[ 945340]   WARN - run.EmulatorConnectionListener - Timed out after 300seconds waiting for emulator to come online. 
[ 965742]   WARN -                    #InstantRun - Instant Run enabled, but not doing an instant run build since: API_TOO_LOW_FOR_INSTANT_RUN 

[Idea.Log]

I am running on Ubuntu 17.04 and Android Studio 2.3.3

I searched for similar issues and tried to enable adb integration as suggested, with no success.

Marinetti answered 2/8, 2017 at 16:59 Comment(5)
Can you add your idea.log tail? It is on ~/.AndroidStudioPreview3.0/systemCenteno
@MartinRevert pastebin.com/iD2gYD5pMarinetti
My first guess is tthat your project is targeting API 19 and that API level is not intended for Instant Run builds. I suggest to level up your minSdkVersion to 21 and use a matching API emulator. If that is no possible for any reason, then disable Instant Run from File->Settings->Buld, Execution & Deployment ->Instant Run, restart Android Studio and try again.Centeno
Also failed, downloaded the arm x64 api 24 (im on an amd cpu) image with no success. :/ pastebin.com/eAWZqNsV (idea.log)Marinetti
Log stops at very start of the emulator with no errors and no Instant Run error messages now also, that's good. So the problem now is another thing, perhaps something related to the NDK dependencies, but there's no error to prove that. I'm sorry, I cannot help from here.Centeno
W
9

Had the same problem this, version on ubuntu and android studio 2.3.3, 1 ways i did which helped me, i search the for and finally found the solutions on stackoverflow The way is to locate lib64 folder since i am running ubuntu 64 bit. In my case, its located under ~/Android/Sdk/emulator/lib64 and run the commands terminal :

//First write the following command in terminal

$ sudo apt-get install lib64stdc++6:i386

$ sudo apt-get install mesa-utils

//Navigate to the ~/Android/Sdk/emulator/lib64 folder

$ mv libstdc++/ libstdc++.bak

$ ln -s /usr/lib64/libstdc++.so.6 libstdc++

Refrence:- How can I get more information about "Waiting for target device to come online" in Android Studio?

Waler answered 8/8, 2017 at 6:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.