I am using the flake.nix from the nixos flutter wiki.
{
description = "Flutter 3.0.4";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/23.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
android_sdk.accept_license = true;
allowUnfree = true;
};
};
buildToolsVersion = "30.0.3";
androidComposition = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [ buildToolsVersion "28.0.3" ];
platformVersions = [ "31" "28" ];
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
};
androidSdk = androidComposition.androidsdk;
in
{
devShell =
with pkgs; mkShell rec {
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
buildInputs = [
flutter
androidSdk
jdk17
gtk3
];
};
});
}
When I build my flutter app for linux with flutter run --device-id linux
, it returns this error
flutter run --device-id linux
Launching lib/main.dart on Linux in debug mode...
Building Linux application...
Gtk-Message: 10:40:50.202: Failed to load module "colorreload-gtk-module"
Gtk-Message: 10:40:50.203: Failed to load module "window-decorations-gtk-module"
** (reproducible_app:125423): WARNING **: 10:40:50.265: Failed to start Flutter renderer: No GL implementation is available
This is my system info
nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.5.9, NixOS, 23.11 (Tapir), 23.11.20231102.fa804ed`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.17.1`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
This didn’t happen until a few days ago, I’m unsure what I’ve done to my nixos installation that must’ve caused this except maybe a system update.
The result is a blank screen instead of the default counter app.