Setup and Android development
Nexus Setup installs prebuilt products through a native wizard and a
Setup .nxscript definition. See Installation
for the normal end-user workflow.
Android development
Select the pieces appropriate to the work:
| Selection | Purpose |
|---|---|
| Android application development | JDK 17, command-line tools, platform/build tools, and ADB |
| Android native development | NDK and CMake needed by the current engine source build |
| Android emulator | Emulator runtime and Android system image |
| Create a Nexus test phone | A Pixel 5 virtual device with two CPU cores and 2 GB RAM |
The current recipe uses command-line tools 22.0, Android platform 36, build tools 35.0.0, and an Android 16 Google APIs x86_64 emulator image. Native development selects NDK r18b (18.1.5063045) and CMake 3.22.1 to match the engine build. These are release-specific choices, not a request to install whatever happens to be newest.
Android Studio and a global Gradle installation are not required. Application projects use their Gradle wrapper.
SDK and virtual-device locations
The SDK is per user:
- Windows:
%LOCALAPPDATA%/Android/Sdk. - Ubuntu:
$XDG_DATA_HOME/Android/Sdk, normally~/.local/share/Android/Sdk.
Setup records Tools.Android.Path and Tools.Java.Home in
NXBuild.Environment.nxscript. It preserves user edits.
Selecting the emulator selects creation of Nexus_Phone_API36 by default.
Clear the child selection to install the emulator/image alone.
The device lives under ~/.android/avd. Existing settings, snapshots, and data
are preserved. Incomplete devices are reported without overwriting them.
The completion page offers an initially unchecked launch option. Acceleration must be available through Windows Hypervisor Platform or Linux KVM. Setup checks acceleration and reports launch failures separately from installation.
Command-line installation
Use the downloaded bundled installer with --plan to inspect choices, or
--install to install. For example:
NexusInstaller --plan <absolute-install-root> --select AndroidEmulator
NexusInstaller --install <absolute-install-root> --select Android --accept-android-licenses
NexusInstaller --install <absolute-install-root> --select AndroidEmulator --deselect TestPhone --accept-android-licenses
NexusInstaller stands for the actual downloaded installer executable.
Android license acceptance is explicit; --allow-replacement does not accept
licenses. Command-line installation never launches the emulator automatically.
Maintenance and ownership
The installation state is under <root>/.nx/setup/<product-id-key>/.
It retains the payload for repair and records installation/integration actions.
Nexus file transactions can roll back. Shared package-manager changes and virtual-device data are outside that file transaction. Uninstall keeps shared dependencies, SDKs, virtual devices, and user configuration.
For custom Setup definitions, the dialect describes the accepted model and providers.
Repair, removal and recovery
Windows defaults to %LOCALAPPDATA%/Programs/Nexus; Ubuntu defaults to
$XDG_DATA_HOME/Nexus, or ~/.local/share/Nexus. Updates reuse the registered
location and feature selections.
Review does not install packages. Install runs selected shared package providers, then the file transaction, then user integration. Only package operations request elevation. Windows registers Apps & Features; Ubuntu creates a per-user maintenance launcher. Repair uses retained payload and choices. Windows GUI maintenance runs from a temporary copy to permit replacement/removal of the installed executable.
Updates remove obsolete owned files while retaining unowned content and declared
user data. Uninstall removes recorded files and owned integration; preexisting
extensions and changed editor settings remain. Linux PATH integration is a marked
block in ~/.profile; sign in again afterward. Windows updates the user PATH
and broadcasts the change; open a new terminal.
State is under <root>/.nx/setup/<product-id-key>/. The installation file
identifies it; source and payload.zip support repair. setup.log records
commands/results. Integration failure leaves integration.pending and installed
files available for retry. File transactions roll back; shared package changes do not.
NexusInstaller --plan <absolute-root> --log plan.log
NexusInstaller --install <absolute-root> --deselect CommandLine --select Editor --log install.log
NexusSetup --repair <installation-state-file> --log repair.log
NexusSetup --uninstall <installation-state-file> --log uninstall.log
NexusSetup --recover <state-folder> --log recovery.log
Use the downloaded installer or an external runtime for Windows CLI maintenance,
so no executable being removed is running. --allow-replacement explicitly
authorizes incompatible shared-package replacement during --install; otherwise
the CLI declines it. Exit zero means success. Windows GUI binaries have no console;
use --log. --plan validates selected sources without installing packages/files.