tadfisher/android-nixpkgs

Trying to extend with flutter, but sdk issues are reported

tviel opened this issue · 0 comments

tviel commented

Hi,

great project. I'm trying to base a flutter devshell on top, by extending the packages list with flutter. First thing usually run then is a flutter doctor, which checks the environment.

`[✓] Flutter (Channel stable, 3.10.5, on NixOS 23.05 (Stoat) 6.1.38, locale en_US.UTF-8)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop

[!] Android Studio (version 2022.2)
✗ Failed to run Java: ProcessException: No such file or directory
Command:
/nix/store/j8w0032qbyz6951mb6z2fp7nvm0976hy-android-studio-stable-2022.2.1.20-unwrapped/jbr/bin
/java -version
✗ Unable to determine bundled Java version.

[✓] Connected device (1 available)

[✓] Network resources
`

So I have basically two issues with the android-sdk setup, flutter reports:

the license status, but running the proposed command results in
Android sdkmanager tool was found, but failed to run (/nix/store/6ibjrsqxw5x4yrhyq04j9n1r4wz0q1yb-android-sdk-env/share/android-sdk/cmdline-tools/latest/bin /sdkmanager): "exited code 1". Try re-installing or updating your Android SDK, visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions.
which seems rather an sdk setup issue.

For the second one, java is not found in the given path for android studio. Running it directly in the devshell works though.

Would be great to get some thoughts or hints, happy to fiddle around with the setup.
THX