Google Glass SDK:Gradle同步失败:原因:未能找到目标Google Inc.:Glass Development Kit Preview:19 [英] Google Glass SDK: Gradle sync failed: Cause: failed to find target Google Inc.:Glass Development Kit Preview:19

查看:519
本文介绍了Google Glass SDK:Gradle同步失败:原因:未能找到目标Google Inc.:Glass Development Kit Preview:19的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




Gradle同步失败:原因:未能找到目标Google Inc.:Glass
Development Kit Preview:19


请指教。
谢谢

解决方案

一步一步的解决方案,适用于最新的Android Studio 3.1.2:


  1. 关闭Android Studio。 >在< your_main_project_directory> /build.gradle 到新的目录(目前
    classpath'com.android.tools.build:gradle :3.1.2'很好用)。

  2. 启动Android Studio并重新打开项目。

IDE现在可以正确地通知您任何其他必要的更新。您可以安全地接受更新的Gradle版本,因为它现在运行良好。至少在我的项目中,一切都完美无瑕。



上面的行更改并打开项目后,IDE提示示例:

Edit Configurations ...-> Launch Options中点击$ c> Launch:Nothing 。
同样在 app / build.gradle 文件中将 runProguard false 更改为 minifyEnabled真正的(通常不需要,但我曾经这样做过)。


I am getting this error after importing and trying to build the gdk-apidemo-sample-master in Android Studio:

Gradle sync failed: Cause: failed to find target Google Inc.:Glass Development Kit Preview:19

Please advice. Thanks

解决方案

Step by step solution, that works for me on the newest Android Studio 3.1.2:

  1. Close the Android Studio.
  2. Change classpath in the <your_main_project_directory>/build.gradle to new one (currently classpath 'com.android.tools.build:gradle:3.1.2' works good).
  3. Start Android Studio and open your project again.

IDE will now correctly inform you about any other necessary updates. You can safely accept updating Gradle version, as it's working good now. At least in my project everything went flawlessly.

Examples of IDE prompts after above line change and opening the project:

Edit: As @Marcello Cuoghi said you might also need to select Launch: Nothing in the Run->Edit Configurations...->Launch Options. Also in the app/build.gradle file change runProguard false to minifyEnabled true (usually not needed, but I had such once).

这篇关于Google Glass SDK:Gradle同步失败:原因:未能找到目标Google Inc.:Glass Development Kit Preview:19的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆