android - Google Glass App,请在Edit Configuration中选择Android SDK

标签 android android-studio google-glass

首先,让我向您介绍我遇到错误的过程。首先,我在 Android Studio 3.0.1 中创建了一个成功的 Glass 项目。我的其他项目将完全运行,但是当我运行我的玻璃应用程序时,我在编辑配置中收到错误“请选择 Android SDK”。因此,我尝试使用“启动默认 Activity ”和“目标 USB 设备”更改编辑配置。不幸的是,这并不能解决我的问题。

Here是展示如何创建和部署 Google Glass 应用程序的教程。

我对这个问题进行了深入研究,但我发现的每一个资源都说“同步 gradle”。此解决方案不能解决我的问题,也不适合我。

下面是“编辑配置”窗口的示例。

Edit Configuration

enter image description here

enter image description here

enter image description here

enter image description here

最佳答案

首先查看File> Project Structure> SDK Location 确保Android SDK location中的路径是更正一个并匹配你在 gradle 文件中的内容

(可选,也可以在 Project Structure 窗口中,依次选择左侧栏中的每个模块,并确保 android/sdk 字段正确)

您还应确保您的 ANDROID_HOME 环境/系统变量设置为相同的 SDK 位置。看来你用的是 mac 所以 this question可能会帮助你。

之后您可以再次使用 Gradle 清理和同步(正如您之前所说的那样)。

如果仍然失败,那么 File> Invalidate Caches/Restart 通常可以解决我系统上的此类问题,您也可以尝试替换 /home/~/

关于android - Google Glass App,请在Edit Configuration中选择Android SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49234146/

相关文章:

android - 如何连接 iOS 和 Android 设备并在它们之间发送小数据?

选项卡主机中的 Android fragment View 状态

android - 如何使用 Android Studio 获得代码覆盖率?

android - 玻璃 GDK : Intecept Live Card onClick

android-studio - 已安装 Glass Development Kit 但 Android Studio 未找到

java - Android DefaultSharedPreferences 字符串而不是整数

java - 与远程主机的 TCP 套接字连接失败 (EINVAL)

Mac崩溃后Android模拟器状态栏渲染困惑

android-studio - 无法在 MacBook Pro M1 上构建 Android Studio 项目

google-glass - Glass GDK - 在 LiveCard 上禁用头部手势