Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple and minimal flake.nix template for flutter + androidSdk

NotificationsYou must be signed in to change notification settings

Rexcrazy804/flutter-nix-android-template

Repository files navigation

This is a simple nix flake template that aims to provide a simple barebonesworking flutter template that comes with the androidSdk. Everything else I foundacross github simply weren't minimal enough to my liking.

Feel free to contribute or raise issues that may arise when using this template.Have fun :D

Instructions

The following will yeild a directory named my_new_project populated with the template

nix flake new my_new_project -t github:Rexcrazy804/flutter-nix-android-templatecd my_new_projectnix develop

Setting up Android Virtual Device

Before we create the virtual device I recommend enabling kvm support by enabling the respectivekvm kernelmodule for your specific CPU. with the following nix option

boot.kernelModules=["kvm-intel"];# "kvm-amd" for amd cpus

Next add your user to the kvm group with like follows

users.users.rexies.extraGroups=["kvm"];# replace rexies with your username

Once that is done cd back into the directory you have just created for theflutter project and load the devShell usingnix develop (I HIGHLY recommendlooking intonix-direnv) and execute thefollowing commands

avdmanager create avd -ntest -k"system-images;android-35;google_apis_playstore_ps16k;x86_64"# you may run the above command without the -k "...." part to get the list of available platformsflutter emulators --launchtestflutter run -d sdk# don't forget flutter pub get if required

Configuring adb

If you'd prefer wireless debugging on your android device you may enable adb as follows

programs.adb.enable=true;users.users.rexies.extraGroups=["adbusers"];

then pairing step would require the following comands

adb pair<deviceIP>:<paring-port><pairing code>adb connect<deviceIP>:<connection-port>

About

A simple and minimal flake.nix template for flutter + androidSdk

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp