-1

Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.

However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').

My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.

What I've already done:

  • installed openjdk
  • set android_home
  • installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
  • enabled USB-debugging
  • tried with MTP and PTP
  • tried another emulated phone
  • installed lib32stdc++6
  • restarted my computer
  • and probably much more

I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.

Thank you in advance.

EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).

However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?

Anonymous
  • 902
  • 10
  • 23

2 Answers2

0

Try to completely delete and install Android Studio again, I think that it will solve the problem

Armen Hovhannisian
  • 932
  • 1
  • 11
  • 27
  • Unfortunately, this didn't solve the problem for me. Running app still doesn't work, neither on phone nor on emulator. – Anonymous Jul 11 '17 at 23:18
  • There's no error screen. It just gets stuck on a specific message: phone: [link](http://maxschroeder.dnshome.de/for_stackoverflow/run_on_phone.png) emulator: [link](http://maxschroeder.dnshome.de/for_stackoverflow/run_on_emulator.png) Everything works with adb: [link](http://maxschroeder.dnshome.de/for_stackoverflow/install_with_adb.png) Or what do you mean? – Anonymous Jul 12 '17 at 10:14
  • try to create completely new project and let me know – Armen Hovhannisian Jul 12 '17 at 10:26
  • As I've wrote above: The problem is, I can create a new empty project and leave it empty but I won't be able to run it on phone or emulator. Just installing via adb works for me. – Anonymous Jul 12 '17 at 10:27
  • okay but i do not understand the part where you say i am not able to run it on phone or emulator you click the RUN green triangle and than the Android Studio installing the apk your your phone and the it automatically opens in your phone so what happens when you click RUN it is just unresponsible or there is something writing in logs or popup error in the phone there should something happen – Armen Hovhannisian Jul 12 '17 at 10:36
  • On the phone: nothing happens. In Android Studio: everything starts as normal but when it shows the message "Installing APKs" I can wait an hour but nothing will happen. For the emulator it's the same: It gets stuck on the message "Waiting for target device to come online" as you can see in the images above. With adb everything works fine. – Anonymous Jul 12 '17 at 10:42
  • try other android devices it might solve the problem and change the USB cable – Armen Hovhannisian Jul 12 '17 at 21:44
  • You got it wrong. It works on my phone now because I used USB 2.0 instead of USB 3.0. But AVD ist still not working. – Anonymous Jul 12 '17 at 21:57
  • install new ADV devices – Armen Hovhannisian Jul 12 '17 at 22:00
  • I've already installed many AVDs with different Android versions, screen sizes and even different architectures (x86, amd64, arm). I also tried different values for graphics and RAM. What else can I do? – Anonymous Jul 12 '17 at 22:09
0

Another possible solution that worked for me is to, in the application, go to

app - build - intermediates - split-apk - debug - slices

and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.

E. Chen
  • 11
  • 5
  • Creating a new empty project doesn't even work for me. – Anonymous Jul 11 '17 at 23:19
  • I tried it but it didn't change anything. The problem is, I can create a new empty project and leave it empty but I won't be able to run it on phone or emulator. Just installing via adb works for me. – Anonymous Jul 12 '17 at 10:26