简体   繁体   English

如何通过 Android 移动设备安装 apk Wear 模拟器

[英]How to install apk wear emulator via Android mobile device

I am trying to install wear apk into wear emulator via USB mobile device.我正在尝试通过 USB 移动设备将 Wear apk 安装到 Wear 模拟器中。

I created the wear apk having the same package name and added the signed wear apk into the raw folder of the device sdk.我创建了具有相同包名称的磨损 apk,并将签名的磨损 apk 添加到设备 sdk 的原始文件夹中。 Also add the XML:还要添加 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.通过在设备中使用 Android Wear 应用程序,我通过移动设备连接了 Wear 模拟器。

But when I try to install/debug apk it is not showing in the wear emulator.但是当我尝试安装/调试 apk 时,它没有显示在磨损模拟器中。

Please follow steps below to install Android Wear app on emulator through mobile device.请按照以下步骤通过移动设备在模拟器上安装 Android Wear 应用程序。

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等待模拟器初始化并显示 Android Wear 主页
    screen.屏幕。

Pair your handheld with the emulator:将您的掌上电脑与模拟器配对:

  • On your handheld, install the Android Wear app from Google Play.在您的掌上电脑上,从 Google Play 安装 Android Wear 应用程序。

  • Connect the handheld to your machine through USB.通过 USB 将手持设备连接到您的机器。

  • Forward the AVD's communication port to the connected handheld device (you must do this every time the handheld is connected:将 AVD 的通信端口转发到连接的手持设备(每次连接手持设备时都必须这样做:

     adb -d forward tcp:5601 tcp:5601
  • Start the Android Wear app on your handheld device and connect to the emulator.在您的手持设备上启动 Android Wear 应用程序并连接到模拟器。

  • Tap the menu on the top right corner of the Android Wear app and select Demo Cards.点击 Android Wear 应用程序右上角的菜单,然后选择演示卡。

  • The cards you select appear as notifications on the home screen of the emulator.您选择的卡片在模拟器的主屏幕上显示为通知。

Please check this guidlines for more information!请查看此指南以获取更多信息!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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