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

后端 未结 2 1775
长情又很酷
长情又很酷 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:29

    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 /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).

提交回复
热议问题