【问题标题】:Create Wearable app to existing Android App?为现有的 Android 应用创建可穿戴应用?
【发布时间】:2014-09-22 04:22:46
【问题描述】:

我正在尝试为我现有的 Android 应用创建一个可穿戴应用。

使用 Android Studio,我能够一起创建移动应用和可穿戴应用。现在,我想在我现有的 Android 应用中使用这个可穿戴应用。

我们怎样才能做到这一点?

【问题讨论】:

    标签: android eclipse android-studio wear-os


    【解决方案1】:

    将现有项目中的磨损模块(或手动构建)克隆为新项目。

    添加您的settings.gradle 新模块。 你应该有这样的东西:

    include ':myApp', ':wear'
    

    在您的应用中,您必须在 build.gradle 中添加:

    dependencies {
        // your current dependencies
        wearApp project(':wear')
        // may be you have to use also gplay services lib. It depends by your app.
        // compile 'com.google.android.gms:play-services-wearable:5.0.77'
    }
    

    注意包装。 穿戴和移动应用使用相同的包!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多