缺少功能:WATCH android wear

Missing feature: WATCH android wear

这两天尝试将 hello world 项目部署到 galaxy Active 2 wear 中。它仍然显示 缺失的功能:WATCH。该项目正确部署到我的手机中,但是选择磨损一个,它显示了消息:无法安装应用程序:INSTALL_FAILED_MISSING_SHARED_LIBRARY 我已经阅读了相关问题 like here, 但无法解决,这里是 wear sdk 的屏幕截图。 移动 SDK 是:

// mobile sdk used
android {
compileSdkVersion 28

defaultConfig {
    applicationId "com.sensewatch.myapplication"
    minSdkVersion 24
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Samsung Galaxy Watch Active 2 运行 Tizen OS 未佩戴 OS Google。

在 AndroidManifest 中删除这个:

 `< uses-feature android:name="android.hardware.type.watch" />`

并将用户库(也在 AndroidManifest 中)设置为 false。

<uses-library android:name="com.google.android.wearable" android:required="false" />