Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
311d371a
Commit
311d371a
authored
Oct 27, 2016
by
Dan Rubel
Committed by
GitHub
Oct 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display ANDROID_HOME env var in flutter doctor (#6558)
parent
abb0a14a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
android_sdk.dart
packages/flutter_tools/lib/src/android/android_sdk.dart
+4
-2
android_workflow.dart
packages/flutter_tools/lib/src/android/android_workflow.dart
+17
-4
No files found.
packages/flutter_tools/lib/src/android/android_sdk.dart
View file @
311d371a
...
...
@@ -11,6 +11,8 @@ import '../base/common.dart';
import
'../base/os.dart'
;
import
'../globals.dart'
;
const
String
kAndroidHome
=
'ANDROID_HOME'
;
// Android SDK layout:
// $ANDROID_HOME/platform-tools/adb
...
...
@@ -58,8 +60,8 @@ class AndroidSdk {
static
AndroidSdk
locateAndroidSdk
()
{
String
androidHomeDir
;
if
(
Platform
.
environment
.
containsKey
(
'ANDROID_HOME'
))
{
androidHomeDir
=
Platform
.
environment
[
'ANDROID_HOME'
];
if
(
Platform
.
environment
.
containsKey
(
kAndroidHome
))
{
androidHomeDir
=
Platform
.
environment
[
kAndroidHome
];
}
else
if
(
Platform
.
isLinux
)
{
if
(
homeDirPath
!=
null
)
androidHomeDir
=
'
$homeDirPath
/Android/Sdk'
;
...
...
packages/flutter_tools/lib/src/android/android_workflow.dart
View file @
311d371a
...
...
@@ -29,10 +29,18 @@ class AndroidWorkflow extends DoctorValidator implements Workflow {
String
sdkVersionText
;
if
(
androidSdk
==
null
)
{
if
(
Platform
.
environment
.
containsKey
(
kAndroidHome
))
{
String
androidHomeDir
=
Platform
.
environment
[
kAndroidHome
];
messages
.
add
(
new
ValidationMessage
.
error
(
'
$kAndroidHome
=
$androidHomeDir
\n
'
'but Android Studio / Android SDK not found at this location.'
));
}
else
{
messages
.
add
(
new
ValidationMessage
.
error
(
'Android Studio / Android SDK not found. Download from https://developer.android.com/sdk/
\n
'
'(or visit https://flutter.io/setup/#android-setup for detailed instructions).'
));
}
}
else
{
type
=
ValidationType
.
partial
;
...
...
@@ -47,6 +55,11 @@ class AndroidWorkflow extends DoctorValidator implements Workflow {
));
}
if
(
Platform
.
environment
.
containsKey
(
kAndroidHome
))
{
String
androidHomeDir
=
Platform
.
environment
[
kAndroidHome
];
messages
.
add
(
new
ValidationMessage
(
'
$kAndroidHome
=
$androidHomeDir
'
));
}
List
<
String
>
validationResult
=
androidSdk
.
validateSdkWellFormed
();
if
(
validationResult
.
isEmpty
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment