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

后端 未结 2 1729
长情又很酷
长情又很酷 2021-01-23 17:07

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 tar

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-23 17:19

    I had the same problem and seems to be gradle doesn't support GDK in the newer versions. Open Android Studio and click open, under File menu, and select the directory of your project. In Top-Level build.gradle file, change the 8th line with classpath 'com.android.tools.build:gradle:2.2.3' and the 20th line runProGuard false with minifyEnabled false. In gradle-wrapper.properties file change last part of the 6th line with gradle-2.14.1-all.zip. After that click on Try Again and it will work. If it ask you to update gradle version always ignore it, because if you update gradle it doesn't recognize the GDK. To start app in google glass also change the settings in Run menu, Edit Configurations. In Launch Options select nothing, beacause glassware doesn't have default activity.

提交回复
热议问题