Status Update
Comments
la...@google.com <la...@google.com>
ha...@google.com <ha...@google.com> #2
Was not able to reproduce the error on Windows 10 or Linux, could be just the Mac package(s) with the issue. Can someone with a Mac take a look at this?
mj...@gmail.com <mj...@gmail.com> #3
I made a request today to my client's IT director to find another mobile dev using a corporate-issued M1 Macbook Pro like mine. Then, while connected to the internal network, have them attempt to install the NDK library through Android Studio. If that happens and I hear back, I'll post the outcome here.
Meanwhile, I tested the same steps on my personal Intel Macbook Pro residing on my personal wifi but with no connection to the client's network. I was able to install and configure the libraries and launch the android app with no issues at all. This tells me that my network and most likely the Google repo are not the culprits here.
However, please have someone test the NDK install on an M1 so that we can eliminate or identify another problem vector.
mj...@gmail.com <mj...@gmail.com> #4
I don't know exactly what I changed in my environment, but now I get this:
Preparing "Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)".
Downloading https://dl.google.com/android/repository/android-ndk-r21e-darwin-aarch64.zip
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" ready.
Installing NDK (Side by side) 21.4.7075529 in /Users/AH94896/Library/Android/sdk/ndk/21.4.7075529
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" complete.
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" finished.
The download/install succeeded. To confirm, I'll need to reset my environment and pay closer attention to what I changed.
mj...@gmail.com <mj...@gmail.com> #5
One question: This issue appears to have resolved when I reset the project root. The app is a React Native app which has a folder structure of project-root/android/app
. At first, I had the root set as just /app
. Now it's set as project-root/android/app
. This may have had some bearing on where the ndk installer looked when unzipping the files.
What is the correct root directory in this situation?
mj...@gmail.com <mj...@gmail.com> #6
Ok. I have no idea what happened. But after 3 weeks of apparent normality, the same NDK download failure reoccurred.
I made one change to my android config. I bumped the sdk version, from 30 to 31, in my android/build.gradle
file. That's it. However, I changed it back. Same result.
Preparing "Install NDK (Side by side) 21.0.6113669 (revision: 21.0.6113669)".
Downloading https://dl.google.com/android/repository/android-ndk-r21-darwin-aarch64.zip
This download could not be finalized from the interim state. Retrying without caching.
Downloading https://dl.google.com/android/repository/android-ndk-r21-darwin-aarch64.zip
Failed packages:
- NDK (Side by side) 21.0.6113669 (ndk;21.0.6113669)
What prompted me to try to reinstall this ndk version was this console error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> No version of NDK matched the requested version 21.0.6113669. Versions available locally: 21.4.7075529
I'm out of ideas and patience. Can someone please address this issue?
hu...@gmail.com <hu...@gmail.com> #7
th...@accountable.eu <th...@accountable.eu> #8
za...@gmail.com <za...@gmail.com> #9
ud...@gmail.com <ud...@gmail.com> #10
[Deleted User] <[Deleted User]> #11
[Deleted User] <[Deleted User]> #12
[Deleted User] <[Deleted User]> #13
[Deleted User] <[Deleted User]> #14
as...@gmail.com <as...@gmail.com> #15
fu...@gmail.com <fu...@gmail.com> #16
same here with M1
React Native error:
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No version of NDK matched the requested version 21.0.6113669. Versions available locally: 22.1.7171670
Android Studio error:
Preparing "Install NDK (Side by side) 21.0.6113669 (revision: 21.0.6113669)".
Downloading https://dl.google.com/android/repository/android-ndk-r21-darwin-aarch64.zip
This download could not be finalized from the interim state. Retrying without caching.
Downloading https://dl.google.com/android/repository/android-ndk-r21-darwin-aarch64.zip
Failed packages:
- NDK (Side by side) 21.0.6113669 (ndk;21.0.6113669)
em...@google.com <em...@google.com>
em...@google.com <em...@google.com> #17
(previous version of this message was slightly incorrect)
This reproduces:
- For some NDK r21 versions
- Only on Mac M1
For most NDKs, one of the following two holds:
- SDK contains universal NDKs for
x86_64
andaarch64
(i.e., same zip for both) and Its checksum is correct. - SDK contains two separate NDK zips for for
x86_64
andaarch64
but they are identical and their checksums are also identical.
For a few problematic NDKs:
- There are two different zip files for
x86_64
andaarch64
- The expected checksum for
x86_64
is correct, that's why it works on Macx86_64
- The expected checksum for
aarch64
is incorrect, it is identical tox86_64
, which looks like a copy/paste error in therepository2-3.xml
em...@google.com <em...@google.com> #18
The checksum of the following NDKs need to be fixed:
- r21
- r21-beta2
- r21b-beta1
If you are using any of the above NDK versions, please switch to a different NDK while we work on a fix. The most recent NDK 21 flavor is NDK 21e and it can be downloaded from SDK Manager without any issues.
fu...@gmail.com <fu...@gmail.com> #19
For anyone facing the same problem in React Native project by using M1.
Here's what I've done. Hope it helped!!
step 1
Download NDK (version 21.4.7075529) on Android Studio which was successfully downloaded. (NDK 21e = ndkVersion "21.4.7075529", ref:
You can also check NDK file with cmd-line open ~/Library/Android/sdk/ndk
step 2
Notice that only downloading NDK version would still popped up error like below, it is still finding the requested version 21.0.6113669.
So you have to add ndk version path in the local.properties
file under React Native project android directory.
(If there isn't a file called local.properties
under android directory, then you have to create it.)
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No version of NDK matched the requested version 21.0.6113669. Versions available locally: 22.1.7171670 21.4.7075529
Add this path in your local.properties
file.
ndk.dir=/Users/USERNAME/Library/Android/sdk/ndk/21.4.7075529
step 3
npm run android again and it worked!
em...@google.com <em...@google.com> #20
Android NDKs that had incorrect M1 hash values have been removed from the Android SDK so that they won't be downloadable. If need to use Android NDK on Mac M1, we recommend using the latest NDK (currently NDK 25).
If you specifically need to use NDK version 21, please use the latest minor version release, i.e., 21e.
da...@google.com <da...@google.com> #21
FWIW we don't believe the NDKs that have had their M1 artifacts removed have ever been usable on M1 Macs. r21 predates proper M1 support, but as far as we can tell these have never been downloadable on an M1 Mac even with rosetta, because prior to the SHA mismatch in the SDK manifest the artifacts did not exist at all.
sa...@google.com <sa...@google.com> #22
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Giraffe Canary 1 (2022.3.1.1)
- Android Gradle Plugin 8.1.0
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Build: AI-213.7172.25.2113.9014738, 202208312042,
AI-213.7172.25.2113.9014738, JRE 11.0.13+0-b1751.21-8125866x64 JetBrains s.r.o., OS Mac OS X(aarch64) v12.5.1, screens 3456.0x2234.0, 1920.0x1080.0
AS: Dolphin | 2021.3.1 Kotlin plugin: 213-1.7.10-release-for-android-studio-AS6777.52 Android Gradle Plugin: (plugin information not found) Gradle: (gradle version information not found) Gradle JDK: version 11.0.13 NDK: from local.properties: (not specified), latest from SDK: (not found) CMake: from local.properties: (not specified), latest from SDK: 3.18.1-g262b901, from PATH: (unable to invoke cmake)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.
Steps to reproduce:
Appearance & Behavior > System Settings > Android SDK
Show Package Details
, scroll down toNDK (side by side)
and select any version (specifically, I need 21.0.6113669)Expected results: Selected NDK version installs
Actual results:
From the
idea.log
fileI hope I have provided enough detail. If not, please feel free to reach out with questions.
Regards, Michael Stelly