Skip to content

[bug] No emulator found and can't find crate for core #13459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Vilhelm-Ian opened this issue May 17, 2025 · 0 comments
Open

[bug] No emulator found and can't find crate for core #13459

Vilhelm-Ian opened this issue May 17, 2025 · 0 comments
Labels
help wanted Help is requested to fix this issue platform: Nix/NixOS Issues specific to NixOS or Nix tooling status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@Vilhelm-Ian
Copy link

Vilhelm-Ian commented May 17, 2025

Describe the bug

I can't run npm run tauri android dev

Reproduction

Have the following things in configuration.nix

    programs.java.enable = true;

  environment.systemPackages = with pkgs; [
    android-studio
   ]

the following in home-manager/home.nix

  home.sessionVariables = {
    ANDROID_HOME  = "$HOME/Android/Sdk";
    NDK_HOME = "${config.home.sessionVariables.ANDROID_HOME}/ndk/$(ls -1 ${config.home.sessionVariables.ANDROID_HOME}/ndk | head -n1)";
  };

and the following in shell.nix in the project

let
  pkgs = import <nixpkgs> { };
in
pkgs.mkShell {
  nativeBuildInputs = with pkgs; [
    pkg-config
    gobject-introspection
    cargo
    rustc
    cargo-tauri
    nodejs
    android-tools
    rustup
  ];

  buildInputs = with pkgs;[
    at-spi2-atk
    atkmm
    cairo
    gdk-pixbuf
    glib
    gtk3
    harfbuzz
    librsvg
    libsoup_3
    pango
    webkitgtk_4_1
    openssl
    tailwindcss
  ];

}

Expected behavior

to open android-studio and the app

Full tauri info output

[I] petar@nixos ~/D/p/t/task-athlete-gui (main)> npm run tauri info

> [email protected] tauri
> tauri info


[✔] Environment
    - OS: NixOS 24.11.0 x86_64 (X64) (Unknown DE on wayland)
    ✔ webkit2gtk-4.1: 2.46.6
    ✔ rsvg2: 2.58.3
    ✔ rustc: 1.82.0 (f6e511eec 2024-10-15) (built from a source tarball)
    ✔ cargo: 1.82.0 (8f40fc59f 2024-08-21)
    ✔ rustup: 1.27.1 (1980-01-01)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 20.18.3
    - npm: 10.8.2

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - tauri-cli 🦀: 2.4.0 (outdated, latest: 2.5.0)
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-opener 🦀: 2.2.6
    - @tauri-apps/plugin-opener : 2.2.6

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

~/D/p/t/task-athlete-gui (main)> npm run tauri android dev

> [email protected] tauri
> tauri android dev

       Error No available Android Emulator detected
     Running BeforeDevCommand (`npm run dev`)

> [email protected] dev
> vite


  VITE v6.3.4  ready in 614 ms

  ➜  Local:   http://localhost:1420/
   Compiling quote v1.0.40
   Compiling zerocopy v0.8.25
   Compiling libc v0.2.172
   Compiling getrandom v0.2.16
   Compiling getrandom v0.1.16
   Compiling lock_api v0.4.12
   Compiling parking_lot_core v0.9.10
   Compiling icu_normalizer_data v1.5.1
error[E0463]: can't find crate for `core`
  |
  = note: the `aarch64-linux-android` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-linux-android`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `libc` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
`Failed to run `cargo build`: command ["cargo", "build", "--package", "task-athlete-gui", "--manifest-path", "/home/user/Documents/programiranje/task/task-athlete-gui/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--lib"] exited with code 101
       Error `Failed to run `cargo build`: command ["cargo", "build", "--package", "task-athlete-gui", "--manifest-path", "/home/user/Documents/programiranje/task/task-athlete-gui/src-tauri/Cargo.toml", "--target", "aarch64-linux-android", "--lib"] exited with code 101

Additional context

~/D/p/t/task-athlete-gui (main)> adb devices
List of devices attached
emulator-5554	device

so there is an emulator running even though it says no emulator detected

~/D/p/t/task-athlete-gui (main)> rustup target list --installed
aarch64-linux-android
armv7-linux-androideabi
i686-linux-android
x86_64-linux-android
x86_64-unknown-linux-gnu

here the env variables

[I] user@nixos ~/D/p/t/task-athlete-gui (main)> echo $ANDROID_HOME
/home/user/Android/Sdk
[I] user@nixos ~/D/p/t/task-athlete-gui (main)> echo $JAVA_HOME
/nix/store/kkpj4pzzqaq0hxpqn25dbafjws9rl422-openjdk-21.0.5+11/lib/openjdk
[I] user@nixos ~/D/p/t/task-athlete-gui (main)> echo $NDK_HOME
/home/user/Android/Sdk/ndk/29.0.13113456
@Vilhelm-Ian Vilhelm-Ian added type: bug status: needs triage This issue needs to triage, applied to new issues labels May 17, 2025
@FabianLars FabianLars added platform: Nix/NixOS Issues specific to NixOS or Nix tooling help wanted Help is requested to fix this issue labels May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help is requested to fix this issue platform: Nix/NixOS Issues specific to NixOS or Nix tooling status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants