Android: Difference between revisions
imported>Numinit No edit summary |
imported>Jappeace Add config that prevents you having to download the entire sdk again |
||
| Line 102: | Line 102: | ||
<syntaxhighlight lang=console> | <syntaxhighlight lang=console> | ||
$ nix-shell -p android-studio --run android-studio | $ nix-shell -p android-studio --run android-studio | ||
</syntaxhighlight> | |||
To link up with nix sdk and have gradlew: | |||
<syntaxhighlight lang=nix> | |||
{ pkgs ? import <nixpkgs> {config.android_sdk.accept_license = true; config.allowUnfree = true;} }: | |||
let | |||
androidSdk = pkgs.androidenv.androidPkgs_9_0.androidsdk; | |||
in | |||
pkgs.mkShell { | |||
buildInputs = [ | |||
androidSdk | |||
pkgs.glibc | |||
pkgs.android-studio | |||
]; | |||
# override the aapt2 that gradle uses with the nix-shipped version | |||
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/28.0.3/aapt2"; | |||
ANDROID_SDK_ROOT="${androidSdk}/libexec/android-sdk/"; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||