简体   繁体   中英

How to install apk wear emulator via Android mobile device

I am trying to install wear apk into wear emulator via USB mobile device.

I created the wear apk having the same package name and added the signed wear apk into the raw folder of the device sdk. Also add the XML:

<wearableApp package="com.xxx.xx.xx">
<versionCode>6</versionCode>
<versionName>1.0.1</versionName>
<rawPathResId>xxx_wear</rawPathResId>
</wearableApp>

and mentioned in the manifest

        <meta-data android:name="com.google.android.wearable.beta.app"
               android:resource="@xml/wearable_app_desc"/>

By using Android wear app in the device, I connected the wear emulator by the mobile device.

But when I try to install/debug apk it is not showing in the wear emulator.

Please follow steps below to install Android Wear app on emulator through mobile device.

Start the emulator:

  • Select the virtual device you have created.
  • Click the Play button.

  • Wait until the emulator initializes and shows the Android Wear home
    screen.

Pair your handheld with the emulator:

  • On your handheld, install the Android Wear app from Google Play.

  • Connect the handheld to your machine through USB.

  • Forward the AVD's communication port to the connected handheld device (you must do this every time the handheld is connected:

     adb -d forward tcp:5601 tcp:5601
  • Start the Android Wear app on your handheld device and connect to the emulator.

  • Tap the menu on the top right corner of the Android Wear app and select Demo Cards.

  • The cards you select appear as notifications on the home screen of the emulator.

Please check this guidlines for more information!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM