SDK 39 Android build fails because requested NDK version (21.0.6113669) not found
See original GitHub issueNew Issue Checklist
- Updated turtle-cli to the latest version (
yarn global add turtle-cli
ornpm install --global turtle-cli
). - I read the Contribution Guidelines.
- I read docs.expo.io (Managed Workflow > Distributing Your App).
- I searched for existing GitHub issues.
- I enclosed the complete output when running turtle, including the stack trace and command used.
Issue Description
After upgrading our app to SDK39 turtle-cli fails to build it for Android. From the log output I think gradle misses version 21 of NDK.
Command executed
turtle build:android --public-url https://$STAFF_APP_RELEASE_PUBLIC_URL/android-index.json -o $ANDROID_BUNDLE_OUTPUT_PATH -t app-bundle --keystore-path ./staff-app.keystore --keystore-alias $EXPO_ANDROID_KEYSTORE_ALIAS --release-channel=$STAFF_APP_RELEASE_CHANNEL
Complete output when running turtle, including the stack trace and command used
1072Sep 22 20:19:06 turtle[61937] INFO: Execution failed for task ':app:stripReleaseDebugSymbols'. 1073 platform: "android" 1074 buildPhase: "running gradle" 1075 source: "stderr" 1076Sep 22 20:19:06 turtle[61937] INFO: > No version of NDK matched the requested version 21.0.6113669. Versions available locally: 17.2.4988734 1077 platform: "android" 1078 buildPhase: "running gradle" 1079 source: "stderr" 1080Sep 22 20:19:06 turtle[61937] INFO: * Try: 1081 platform: "android" 1082 buildPhase: "running gradle" 1083 source: "stderr" 1084Sep 22 20:19:06 turtle[61937] INFO: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 1085 platform: "android" 1086 buildPhase: "running gradle" 1087 source: "stderr" 1088Sep 22 20:19:06 turtle[61937] INFO: * Get more help at https://help.gradle.org 1089 platform: "android" 1090 buildPhase: "running gradle" 1091 source: "stderr" 1092Sep 22 20:19:06 turtle[61937] INFO: BUILD FAILED in 8m 50s 1093 platform: "android" 1094 buildPhase: "running gradle" 1095 source: "stderr" 1096Sep 22 20:19:06 turtle[61937] INFO: Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. 1097 platform: "android" 1098 buildPhase: "running gradle" 1099 source: "stdout" 1100Sep 22 20:19:06 turtle[61937] INFO: Use '--warning-mode all' to show the individual deprecation warnings. 1101 platform: "android" 1102 buildPhase: "running gradle" 1103 source: "stdout" 1104Sep 22 20:19:06 turtle[61937] INFO: See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings 1105 platform: "android" 1106 buildPhase: "running gradle" 1107 source: "stdout" 1108Sep 22 20:19:06 turtle[61937] INFO: 25 actionable tasks: 25 executed 1109 platform: "android" 1110 buildPhase: "running gradle" 1111 source: "stdout" 1112Sep 22 20:19:09 turtle[61937] ERROR: Error: ./gradlew exited with non-zero code: 1 1113 at ChildProcess.completionListener (/usr/local/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13) 1114 at Object.onceWrapper (events.js:422:26) 1115 at ChildProcess.emit (events.js:315:20) 1116 at ChildProcess.EventEmitter.emit (domain.js:483:12) 1117 at maybeClose (internal/child_process.js:1021:16) 1118 at Socket.<anonymous> (internal/child_process.js:443:11) 1119 at Socket.emit (events.js:315:20) 1120 at Socket.EventEmitter.emit (domain.js:483:12) 1121 at Pipe.<anonymous> (net.js:674:12) 1122 ... 1123 at spawnAsync (/usr/local/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19) 1124 at spawnAsyncThrowError (/@expo/xdl@57.9.35/src/detach/ExponentTools.ts:111:19) 1125 at buildShellAppAsync (/@expo/xdl@57.9.35/src/detach/AndroidShellApp.js:1412:11) 1126 at Object.createAndroidShellAppAsync (/@expo/xdl@57.9.35/src/detach/AndroidShellApp.js:370:5) 1127 at runShellAppBuilder (/usr/local/lib/node_modules/turtle-cli/src/builders/android.ts:91:5) 1128 at buildAndroid (/usr/local/lib/node_modules/turtle-cli/src/builders/android.ts:23:26) 1129 at /usr/local/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:87:7 1130 at Command.<anonymous> (/usr/local/lib/node_modules/turtle-cli/src/bin/index.ts:23:12) 1131 platform: "android" 1132Sep 22 20:19:09 turtle[61937] ERROR: Failed to build standalone app 1133 err: Error: ./gradlew exited with non-zero code: 1 1134 at ChildProcess.completionListener (/usr/local/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13) 1135 at Object.onceWrapper (events.js:422:26) 1136 at ChildProcess.emit (events.js:315:20) 1137 at ChildProcess.EventEmitter.emit (domain.js:483:12) 1138 at maybeClose (internal/child_process.js:1021:16) 1139 at Socket.<anonymous> (internal/child_process.js:443:11) 1140 at Socket.emit (events.js:315:20) 1141 at Socket.EventEmitter.emit (domain.js:483:12) 1142 at Pipe.<anonymous> (net.js:674:12) 1143 ... 1144 at spawnAsync (/usr/local/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19) 1145 at spawnAsyncThrowError (/@expo/xdl@57.9.35/src/detach/ExponentTools.ts:111:19) 1146 at buildShellAppAsync (/@expo/xdl@57.9.35/src/detach/AndroidShellApp.js:1412:11) 1147 at Object.createAndroidShellAppAsync (/@expo/xdl@57.9.35/src/detach/AndroidShellApp.js:370:5) 1148 at runShellAppBuilder (/usr/local/lib/node_modules/turtle-cli/src/builders/android.ts:91:5) 1149 at buildAndroid (/usr/local/lib/node_modules/turtle-cli/src/builders/android.ts:23:26) 1150 at /usr/local/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:87:7 1151 at Command.<anonymous> (/usr/local/lib/node_modules/turtle-cli/src/bin/index.ts:23:12) 1152 platform: "android"
Environment
Expo CLI 3.27.7 environment info: System: OS: macOS 10.15.6 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.18.3 - /usr/local/bin/node Yarn: 1.22.4 - ~/.yarn/bin/yarn npm: 6.14.7 - /usr/local/bin/npm SDKs: iOS SDK: Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 IDEs: Xcode: 11.6/11E708 - /usr/bin/xcodebuild npmPackages: expo: ^39.0.0 => 39.0.2 react-native: https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz => 0.63.2 npmGlobalPackages: expo-cli: 3.27.7 Expo Workflow: managed
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
No version of NDK matched the requested version
Once the Project Structure Dialog is open, go to SDK Location and select your locally installed version of NDK under Android NDK Location....
Read more >Install and configure the NDK and CMake - Android Developers
If you want to use a CMake version that is not included by the SDK Manager, follow these steps: Download and install CMake...
Read more >How to resolve the error No version of NDK ... - YouTube
How to resolve the error No version of NDK matched the requested version 21.0.6113669 - Android development.Facing issue of NDK matched ...
Read more >Andriod build issue after NDK version update
Hi Azure support,. We started seeing below error, after Android NDK version on our pipelines we did tried updating NDK version on pipeline...
Read more >Resolved - Android NDK missing - Unity Forum
What I did : Installed Android SDK & NDK Tools by the lastest Unity Hub (screenshot 1). Tried to "Build" and "Build &...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have resolved ! I have forgotten to update an env variable on my ci script:
turtle setup:android --sdk-version ${EXPO_SDK_VERSION}
Now with EXPO_SDK_VERSION=39.0.0 all works fine. Thank you.