I set the ANDROID_HOME environment variable which points to my location of the Android SDK. However, every time I open my project in Android Studio, it places the local.properties file in the root of my project and copies its SDK location from ANDROID_HOME to this file. I want Android Studio to use ANDROID_HOME directly, without generating local.properties .
Why? I am on Windows 10 and I am using Bash for Windows. I want to run the command line using Bash while starting Android Studio from Windows. To do this, I need two ANDROID_HOME environment ANDROID_HOME , one for Windows, one for Bash. This is due to the fact that although they point to the same (Windows) android SDK, the format is different, for Windows it is C:\Users\me\Android SDK , and for Bash it /mnt/c/Users/me/Android SDK . When Android Studio creates local.properties with a Bash window pass, it becomes broken, as it seems that local.properties takes advantage over ANDROID_HOME , so I need to remove it manually.
source share