Razgriz
Razgriz

Reputation: 7343

Android Studio - How to add a Screen Size Definition

I am building an Android Application using Android Studio.

I want my layout to be as precise as possible, however, it seems that the list of Android Virtual Devices where we can render the layout to is limited to Nexus Devices as shown in this screenshot below:

Device List

and the "Generic Phones and Tablets" do not have much screen size and resolution variety, so I decided to add my device definition as such:

My Device

However, it did not appear in the devices that Android Studio can render a layout to in the Design view of a layout.

Solved

After restarting Android Studio, the newly created AVD (Samsung Galaxy Note 1) now appeared in my list of devices that I can preview the rendering to when I view my layout.

I think all I had to do was to restart Android Studio for it to appear. It works now.

Upvotes: 25

Views: 13831

Answers (2)

ErrricP
ErrricP

Reputation: 1

For others having similar issues, you may want to check the API level of your AVDs vs the compileSDK of your project. I've found that, at least for Wear OS AVDs, my devices that target an earlier API don't show up. Once I made them the same as my compile SDK version, they showed up.

Upvotes: 0

Mike dg
Mike dg

Reputation: 4658

The solution to this, is to restart Android Studio. The new devices should appear at the bottom of the list.

Upvotes: 31

Related Questions