This article explains you how to create a project in android
studio, and run them using the emulator.
Steps:
1.
Create a new wearable project using the wizard
in Android studio, Select “Phone and tablet” and “Watch” in the project type.
2.
You will find 2 projects in the android project –
Mobile and wear.
a.
Mobile project should be installed in the mobile
or tablet.
b.
Wear project should be installed in the watch.
3.
Since android watch comes in both round and square
forms, we have 2 separate layout files –
app:rectLayout="@layout/rect_activity_main"
app:roundLayout="@layout/round_activity_main"
app:roundLayout="@layout/round_activity_main"
Only one of the layout is rendered
depending upon the watch you choose.
4.
If you go to the design view of the the activity
files, you will be able to choose the layout type and see the project you have
created.
Round view layout (or) Square view
5.
Choose an Android virtual device which you want
to run.
This again comes in different formats.
Create the AVD you want.
6.
If you have not installed the system image for
the selected android version, you might need to download it first in your PC.
7.
You can now run the project you have created in
the emulator
No comments:
Post a Comment