I recently wanted to try React Native to code applications. This requires many installations which worked fine, except for AndroidStudio. I use a Windows 10 PC, with hybrid hard drive. I had to download AndroidStudio files on the second drive (D:) because my first hard drive is very small and already full. This type of installation never caused any problems with me (I installed dozens of softwares on D: like this).
I followed diligently React Native Getting Started Guide to install everything on windows for android devices. I ran into several problems :
Firstly, the Android Studio installer never asked me if I wanted a Custom or regular installation. I think this is not an issue as I can still install what's needed afterwards via the SDK manager.
Once I installed everything in the SDK manager and in the AVD manager as asked in the tutorial, I placed the path for ANDROID_HOME in environment variables menu (I also tried in system variables, in both, but this doesn't seem to change anything), and the Path for platform-tools in the Path variable.
One particularity is that I have the following files : D:/AndoidStudio containing the app (that would have installed itself in C:/Program Files otherwise) D:/AndroidStudio_sdk containing the downloaded sdk (Android Studio makes it mandatory to install these files in a different folder)
Then, when I clicked on the green triangle from AVD manager to start the emulator, nothing happened, and I received a Notification in Android Studio's IDE :
Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT
I tried to add this environment variable pointing to the same location as ANDROID_HOME (D:/AndroidStudio_sdk). This hasn't solved the problems and made a new error pop up instead of the first one :
Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [D:\AndroidStudio_sdk]!
I looked up on React Native website and it appears that ANDROID_SDK_ROOT environment variable is in this case used when there's no SDK files inside the ANDROID_HOME location.
What I can't understand is why I can't find the sdk location ? I tried in SDK manager, but it just gives me D:\20_AS_sdk, which is just the value of ANDROID_HOME. Another particularity is that I can't find the sdk folder inside D:\20_AS_sdk (or any default route evoqued on different tutorials).
I really don't understand these issues and I've been blocked on this since 2 days, the only useful comments I found on other threads were just : - set your ANDROID_HOME variable to the proper place, which I already did - install the SDKs and emulator needed, but I did it too without issues I tried to remove everything from AndroidStudio and the linked paths and reinstall everything, many many many times unsuccesfully...
Thank you for your support :)