16

I was trying to install GPU Debugging tool from the sdkmanager of Android Studio. But the following error came:

Packages to install: 
- GPU Debugging tools (extras;android;gapid;3)

Preparing "Install GPU Debugging tools (revision: 3.1.0)".
Downloading https://dl.google.com/android/repository/gapid_2994895_linux.zip
This download could not be finalized from the interim state. Retrying without caching.
Downloading https://dl.google.com/android/repository/gapid_2994895_linux.zip
Failed packages:
- GPU Debugging tools (extras;android;gapid;3)

This was the log.

2020-05-04 15:26:06,959 [  35766]   WARN - ls.idea.sdk.wizard.InstallTask - Checksum of the downloaded result didn't match the expected value. 
java.lang.IllegalStateException: Checksum of the downloaded result didn't match the expected value.
    at com.android.tools.idea.sdk.StudioDownloader.lambda$doDownloadFully$2(StudioDownloader.java:216)
    at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:537)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:513)
    at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:61)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:363)
    at com.android.tools.idea.sdk.StudioDownloader.doDownloadFully(StudioDownloader.java:193)
    at com.android.tools.idea.sdk.StudioDownloader.lambda$doDownloadFully$2(StudioDownloader.java:223)
    at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:537)
    at com.intellij.util.io.HttpRequests.process(HttpRequests.java:513)
    at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:61)
    at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:363)
    at com.android.tools.idea.sdk.StudioDownloader.doDownloadFully(StudioDownloader.java:193)
    at com.android.tools.idea.sdk.StudioDownloader.downloadFullyWithCaching(StudioDownloader.java:140)
    at com.android.repository.impl.installer.BasicInstaller.doPrepare(BasicInstaller.java:71)
    at com.android.repository.impl.installer.AbstractPackageOperation.prepare(AbstractPackageOperation.java:337)
    at com.android.tools.idea.sdk.wizard.InstallTask.preparePackages(InstallTask.java:253)
    at com.android.tools.idea.sdk.wizard.InstallTask.run(InstallTask.java:120)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:894)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:408)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2020-05-04 15:26:06,960 [  35767]   INFO - ectedPackagesStep$CustomLogger - Failed packages: 
2020-05-04 15:26:06,960 [  35767]   INFO - ectedPackagesStep$CustomLogger - - GPU Debugging tools (extras;android;gapid;3) 

On searching the internet I came through this question. But There is no tools option in sdkmanager window.

My System: Android Studio 3.6.3 Xubuntu 20.04 JDK version 11

Black_J
  • 171
  • 1
  • 1
  • 8
  • Same here. Retried a lot. ``` Packages to install: - Google X86_ARM Intel x86 Atom System Image (system-images;android-28;google_ndk;x86) Preparing "Install Google X86_ARM Intel x86 Atom System Image (revision: 10)". Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86-28_r10.zip This download could not be finalized from the interim state. Retrying without caching. Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86-28_r10.zip Failed packages: - Google X86_ARM Intel x86 Atom System Image (system-images;android-28;google_ndk;x86) ``` – lubosz Sep 10 '20 at 08:59

4 Answers4

12

This was the error I was getting while following instructions for react native at https://reactnative.dev/docs/environment-setup.

Error while setting up Android Studio for React native

This is what I did to resolve it.

  • Downloaded the x86_64-31_r03.zip manually from the browser
  • Create a dir called intel in c:\users\<username>\AppData\Local\Android\Sdk\system-images\android-31\
  • Extracted the content of the zip file into intel
  • Restarted Android Studios
Anand Rockzz
  • 6,072
  • 5
  • 64
  • 71
  • 2
    And for Mac, the path was "/Users//Library/Android/sdk/system-images/android-31/default". I had to remove the existing x86_64 directory at that path first (it contained a suspicious .installer directory). – Ian Lovejoy Aug 31 '22 at 03:47
  • 1
    Excellent. This worked perfectly on Windows 10. – Mr-IDE Sep 06 '22 at 17:31
5

I was able to manually download the zip file and extract it to the SDK dir so the resulting path looked like this:

android-sdk/system-images/android-28/google_apis/x86

AVD detected the image afterwards.

Another example path:

android-sdk/system-images/android-30/google_apis_playstore/x86_64
lubosz
  • 848
  • 10
  • 12
5

after a lot of research and trying I'm sharing what solved the problem on my MacOS 12.4

1º - Directly download NDK r21 package (or whatever you want):

Run the code in the terminal to download the package:

wget -c https://dl.google.com/android/repository/android-ndk-r21-darwin-aarch64.zip

2º - Unzip the downloaded file by running the code below:

unzip android-ndk-r21-darwin-aarch64.zip -d x86_64

The file will be in the following path: /Users/${NAME-YOUR-PC}/x86_64

3º - Copy all the files that are inside the android-ndk-r21 folder (it will be inside the x86_64 folder)

4º - Paste into the folder: /Users/${NAME-YOUR-PC}/Library/Android/sdk/ndk/21.0.6113669 the copied files.

5º - Try to run the APP one more time.

Gabriel Costa
  • 168
  • 2
  • 5
1

I am download and manually install success in macOS, first download the zip:

wget -c https://dl.google.com/android/repository/android-ndk-r21-darwin-aarch64.zip

then unzip the file:

unzip android-ndk-r21-darwin-aarch64.zip -d ${VERSION_FOLDER}

replace the file name which you want to download.

Dolphin
  • 29,069
  • 61
  • 260
  • 539