ANDROID_SDK_ROOT support (#2106)
Summary: According to Google, ANDROID_HOME is deprecated. This means, that having only ANDROID_SDK_ROOT as environment variable leading to Android SDK is enough. Flipper supports only ANDROID_HOME, so I would like to add ANDROID_SDK_ROOT support. However, there is a set of rules of ANDROID_HOME and ANDROID_SDK_ROOT priority. Everything is mentioned on a this page: https://developer.android.com/studio/command-line/variables ## Changelog Added ANDROID_SDK_ROOT environment variable support Pull Request resolved: https://github.com/facebook/flipper/pull/2106 Test Plan: Probably I would need a help with this Reviewed By: mweststrate Differential Revision: D27505024 Pulled By: passy fbshipit-source-id: 8bdc66a9652c673fd44944d87af1efc9e93d0f1b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ebcb535fd3
commit
c9b6f6c7d9
@@ -138,7 +138,12 @@ export default (store: Store, logger: Logger) => {
|
||||
const watchAndroidDevices = () => {
|
||||
// get emulators
|
||||
promisify(which)('emulator')
|
||||
.catch(() => `${process.env.ANDROID_HOME || ''}/tools/emulator`)
|
||||
.catch(
|
||||
() =>
|
||||
`${
|
||||
process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT || ''
|
||||
}/tools/emulator`,
|
||||
)
|
||||
.then((emulatorPath) => {
|
||||
child_process.exec(
|
||||
`${emulatorPath} -list-avds`,
|
||||
|
||||
Reference in New Issue
Block a user