Skip to content

Commit

Permalink
Troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed May 21, 2024
1 parent e431ff2 commit 14e01f3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,9 @@ async fn setup(handle: AppHandle) -> anyhow::Result<()> {
}

fn internal_ip() -> String {
if cfg!(mobile) {
std::option_env!("INTERNAL_IP")
.expect("Environment variable INTERNAL_IP was not set")
.to_string()
} else {
String::from("localhost")
}
std::option_env!("INTERNAL_IP")
.expect("Environment variable INTERNAL_IP was not set")
.to_string()
}

fn bootstrap_url() -> Url2 {
Expand Down
35 changes: 35 additions & 0 deletions docs/documentation/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,41 @@ pnpm tauri icon <PATH_TO_YOUR_ICON_IN_PNG_FORMAT>
```
:::

### `Error Have you installed the Android SDK?`

If you get this error:

```
Error Have you installed the Android SDK? The `ANDROID_HOME` environment variable isn't set, and is required: environment variable not found: environment variable not found
npm run tauri android dev exited with code 1
```

It means you are trying to run your app in an Android device, but you are not inside your `androidDev` devShell, which is the one that includes the Android development environment and tooling.

Enter the `androidDev` devShell with:

```bash
nix develop .#androidDev
```

And try again.

### `Error Android Studio project directory src-tauri/gen/android doesn't exist.`

If you get this error:

```
Error Android Studio project directory src-tauri/gen/android doesn't exist. Please run `tauri android init` and try again.
```

It means you haven't initialized your project for Android developm̀ent yet. You can do so by running:

```bash
npm run tauri android init
```

And then try running your command again.

## NixOS Issues

### Connect to devices
Expand Down

0 comments on commit 14e01f3

Please sign in to comment.