You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android Studio Giraffe新建项目缺失表盘活动模板,求安装方法

解决Android Studio Giraffe找不到表盘模板的问题
  • 检查Wear OS插件:打开Settings(Windows/Linux路径为File→Settings,Mac为Android Studio→Settings),进入Plugins面板,搜索Wear OS插件,确认它已启用且为最新版本。若未安装,点击Install后重启Android Studio。
  • 补全SDK组件:打开SDK Manager(Tools→SDK Manager),切换到SDK Tools标签页,勾选Wear OS SDK和Wear OS System Images,点击Apply安装对应版本组件。
  • 手动搭建表盘项目:如果上述操作后仍无模板,可先创建普通Empty Activity项目,再手动添加依赖。在模块级build.gradle的dependencies块中加入:
    implementation "com.google.android.wearable:wearable:2.9.0"
    compileOnly "com.google.android.wearable:wearable:2.9.0"
    implementation "androidx.wear:wear:1.3.0"
    
    接着在AndroidManifest.xml中添加Wear设备声明:
    <uses-feature android:name="android.hardware.type.watch" />
    
  • 清理缓存重启:点击File→Invalidate Caches...,勾选Clear file system cache and local history,选择Invalidate and Restart,重启后再尝试创建项目。

内容的提问来源于stack exchange,提问作者Manuel Jesús Herrera Morgaz

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 18:59:50