Skip to content

Commit

Permalink
feat: make android ndk path reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-crabnebula committed Apr 24, 2024
1 parent a27fc7d commit 16e26a4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/content/docs/start/prerequisites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -263,34 +263,33 @@ export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
- Android SDK Build-Tools
- Android SDK Command-line Tools

4. Set `ANDROID_HOME` and `NDK_HOME` environment variables. Replace the version numbers so it matches your installed version.
Selecting "Show Package Details" in the SDK Manager enables the installation of older package versions. Please only select other than the current packages if you know what you are doing.

{/* TODO: Does the version number change below? */}
4. Set `ANDROID_HOME` and `NDK_HOME` environment variables.

<Tabs>
<TabItem label="Linux">

```sh
export ANDROID_HOME="$HOME/Android/Sdk"
export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105"
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
```

</TabItem>
<TabItem label="macOS">

```sh
export ANDROID_HOME="$HOME/Library/Android/sdk"
export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105"
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
```

</TabItem>
<TabItem label="Windows">

{/* TODO: Do we need a note about this version? */}

```ps
[System.Environment]::SetEnvironmentVariable("ANDROID_HOME", "$env:LocalAppData\Android\Sdk", "User")
[System.Environment]::SetEnvironmentVariable("NDK_HOME", "$env:LocalAppData\Android\Sdk\ndk\25.0.8775105", "User")
$VERSION = Get-ChildItem -Path "$env:LocalAppData\Android\Sdk\ndk"
[System.Environment]::SetEnvironmentVariable("NDK_HOME", "$env:LocalAppData\Android\Sdk\ndk\$VERSION", "User")
```

</TabItem>
Expand Down

0 comments on commit 16e26a4

Please sign in to comment.