5

Aa beginner, failed to run my first Android Application on Android Studio 3.6. How can I make the right setting to see the preview device in the emulator?

I tried the same question and discussion, but failed to solve my problem.enter image description here

Manghud
  • 1,126
  • 3
  • 12
  • 20
  • Did you try to reconnect your device? – BlackBlind Jun 28 '19 at 11:02
  • Open the terminal at the bottom and run following commands: 1. adb kill-server 2. adb start-server 3. adb devices. See whether you find your devices after the last command. Make sure USB debugging is enabled in device. – Mangesh Pawar Jun 28 '19 at 11:02
  • I do not have physical android device. – Manghud Jun 28 '19 at 11:03
  • @Mangesh, thanks, but I do not habe real android device. – Manghud Jun 28 '19 at 11:05
  • are you sure you created Android Virtual Device? – AMAL K G Jun 28 '19 at 11:06
  • Did you successfully clone a device for an emulator? – BlackBlind Jun 28 '19 at 11:06
  • adb kill-server command does not exist. ! – Manghud Jun 28 '19 at 11:06
  • Make sure your emulator set up is done properly? – Mangesh Pawar Jun 28 '19 at 11:09
  • @pythonbuddha https://developer.android.com/studio/command-line/adb take a look – Mangesh Pawar Jun 28 '19 at 11:09
  • Thank you, I need to reconfigure the android virtual device. – Manghud Jun 28 '19 at 11:11
  • @pythonbuddha As a beginner, you probably shouldn't be using AS 3.6 Preview. Please use AS 3.4 Stable. Also, if you won't take my first statement seriously, at least install Stable to run side-by-side with Preview so you can switch back to Stable should anything block you from continuing on some project in Preview - I know you like the new features (frankly, so do I) and hopefully they will come to Android Studio Stable soon. – SnakeException Jun 28 '19 at 15:53
  • in my case that was because of Platform-Tools. check my solution here : https://stackoverflow.com/questions/40022679/android-studio-no-target-device-found/71219257#:~:text=In%20my%20case%20that%20was%20because%20of%20Platform%2DTools.%20I%20updated%20that%20and%20solved.%20path%3A%20File%20%7C%20Settings%20%7C%20Appearance%20%26%20Behavior%20%7C%20System%20Settings%20%7C%20Android%20SDK%20%2D%3E%20Android%20SDK%20Platform%2DTools – Sadegh J Feb 22 '22 at 10:05

3 Answers3

11

Here's the problem: You don't have any virtual devices. Here's a screenshot of what you probably should have to run (In AS 3.6 Preview):

enter image description here

Compare this to your picture where it says "No devices". So, I'm going to walk you through creating an AVD.

Now, since I do have AVDs, I'm just going to create one. click on that drop-down menu that for you says "No devices" and click "Open AVD Manager":

enter image description here

In the popup click "Create Virtual Device..."

enter image description here

In the Virtual Device configuration popup select the device you want and click "Next".

enter image description here

Choose the system image you want (you can go to the other tabs to see what's there) and click "Next"

enter image description here

Then name your AVD and click "Finish"

enter image description here

Now you should see your new Android Virtual Device:

enter image description here

Closing out of it, you can now run your application with the green "Run" arrow!

I hope this helped!

SnakeException
  • 1,148
  • 1
  • 8
  • 26
0

First try this-

Go to the bottom left of Android Studio then click on the square (the one which show/hide the tool on the left, bottom and right) then on Designer. A new tab should be on the right part of android studio, with gradle and maven project.

If still doesn't work, try this -

If you double click on your .xml file tab at the top it will maximize the designer window. Then on the left you can drag the window to shrink and it will reveal the palette. Then just click on the tab on the left to open the project window.

Anupam
  • 2,845
  • 2
  • 16
  • 30
-1

After connecting the device , go to Files -> Invalidate Caches/Restart -> Invalidate and Restart

Athira
  • 1,177
  • 3
  • 13
  • 35