Background
I recently updated my desktop from an aging i7-2700 (bought in 2011) to a Ryzen 9 3900X system with Windows 10 V2004 (Build 19041.508), and this is the note for android development environment setup. Tools involved are simply:
- Android SDK [1]
- Android Studio
Tools already setup are
- Git (with GitBash)
Note the lack of JDK in the list.
Actual Setup
Android SDK
I wanted to install the commandline tool, basically android-sdk/tools
portion of the tools. Simple, just download the commandline tool and extract it to C:\android\android-sdk\tools
and add to path. Done.
Nope, not that simple anymore. As of this writing, Sep 26, 2020, although the downloaded zip file still extracts to a tools
directory, yet it expects itself to reside in C:\android\android-sdk\cmdline-tools
otherwise it will just keep complaining Warning: Could not create settings
with more gibbrish, as mentioned in this StackOverflow Post.
Paths added to user environment
ANDROID_HOME
which points toC:\android\android-sdk
like the good old days%ANDROID_HOME%\cmdline-tools\tools\bin
is appended at the end of%PATH%
I can now run sdkmanager.bat
anywhere. Too bad Google removed the android
command 😭
Android Studio
I decide to install AS 4.2 to try out JetPack Compose, so the installation involves just extracting the zip file without using a installer. And I choose Custom Setup to pick where my Android SDK is so I don’t get another download of the SDK.
However, when it comes to installing Android Emulator Hypervisor Driver for AMD Processors, it just kept erroring with StartService FAILED with error 4294967201
and gave me an url https://github.com/google/android-emulator-hypervisor-driver-for-amd-processors
to just have fun with it. After disabling all the options listed in the page “Is Hypervisor really off”, the emulator runs correctly.
Windows Defender
And of course, Anti-Virus programs are a must on Windows, and on d.android.com there is a whole section on how to minimize the impact by adding directories to exclusion from Windows Defender scanning. Most of the guide is pretty straight forward as I do keep a separate directory for my android tools and source code. One step involves moving Android Studio cache by specifying a location in idea.properties
file using idea.system.path=[path]
; on AS 4.2, the IDE also prompts user to specify a directory for logs using idea.log.path
.
Notes
[1]: You can skip this as AS Setup does this automaically, I still prefer to do things on commandline so it’s a separate step