I set the android_sdk_home variable so that my application could find .android when trying to run. Now I get an error stating that "android_sdk_root is undefined". I am running win 7 with a new installation of Android Studio, inside parallels on a macbook pro.
Thank you for your response. I checked the location and it is identified as the same location as the ANDROID_SDK_HOME environment path. It still says root is undefined. I created an ANDROID_SDK_ROOT enviroment path to the same location and it is still undefined.
I received the same error after installing android studio and trying to run hello world. I think you need to use the SDK Manager inside Android Studio to install some things first.
Open up Android Studio, and click on the SDK Manager in the toolbar.
Now install the SDK tools you need.
For each Android release you are targeting, hit the appropriate Android X.X folder and select (at a minimum):
The SDK Manager will run (this can take a while) and download and install the various SDKs.
Inside Android Studio, File->Project Structure will show you where your Android sdks are installed. As you can see mine is c:\users\Joe\AppData\Local\Android\sdk1.
If I navigate to C:\Users\Joe\AppData\Local\Android\sdk1\sources you can see the various Android SDKs installed there...
ANDROID_HOME, which also points to the SDK installation directory, is deprecated. If you continue to use it, the following rules apply: If ANDROID_HOME is defined and contains a valid SDK installation, its value is used instead of the value in ANDROID_SDK_ROOT. If ANDROID_HOME is not defined, the value in ANDROID_SDK_ROOT is used. If ANDROID_HOME is defined but does not exist or does not contain a valid SDK installation, the value in ANDROID_SDK_ROOT is used instead.
in mac os you can try brew install gradle
You need to make a system env variable with the name: ANDROID_SDK_ROOT and it's value should be C:\Users\your_user_name\AppData\Sdk\tools\bin worked for me
In Android Studio 3.2.1 I got this error because I installed a new API(28) level emulator without installing that API SDK components. After I installed SDK platform and SDK platform tools for the API level 28 and updated Android Emulator the emulator started running.
Hope it may help someone.
You can just install the portable version, the only solution that worked here.
(If you still did not manage to correct this problem...)