Ensure we have the Java binary on PATH when invoking avdmanager (#18908)

See https://github.com/flutter/flutter/issues/13379#issuecomment-400984667.
This commit is contained in:
Danny Tuppeny
2018-06-28 12:09:04 +01:00
committed by GitHub
parent 4a6558f88f
commit 266a720209
2 changed files with 8 additions and 3 deletions

View File

@@ -466,6 +466,8 @@ class AndroidSdk {
}
Map<String, String> _sdkManagerEnv;
/// Returns an environment with the Java folder added to PATH for use in calling
/// Java-based Android SDK commands such as sdkmanager and avdmanager.
Map<String, String> get sdkManagerEnv {
if (_sdkManagerEnv == null) {
// If we can locate Java, then add it to the path used to run the Android SDK manager.