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
2f916790
Unverified
Commit
2f916790
authored
Jul 29, 2021
by
Jenn Magder
Committed by
GitHub
Jul 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show Android SDK path in doctor on partial installation (#87232)
parent
246f313c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
android_workflow.dart
packages/flutter_tools/lib/src/android/android_workflow.dart
+3
-2
android_workflow_test.dart
...ols/test/general.shard/android/android_workflow_test.dart
+20
-10
No files found.
packages/flutter_tools/lib/src/android/android_workflow.dart
View file @
2f916790
...
...
@@ -183,6 +183,9 @@ class AndroidValidator extends DoctorValidator {
}
return
ValidationResult
(
ValidationType
.
missing
,
messages
);
}
messages
.
add
(
ValidationMessage
(
_userMessages
.
androidSdkLocation
(
androidSdk
.
directory
.
path
)));
if
(!
androidSdk
.
cmdlineToolsAvailable
)
{
messages
.
add
(
ValidationMessage
.
error
(
_userMessages
.
androidMissingCmdTools
));
return
ValidationResult
(
ValidationType
.
missing
,
messages
);
...
...
@@ -193,8 +196,6 @@ class AndroidValidator extends DoctorValidator {
return
ValidationResult
(
ValidationType
.
partial
,
messages
);
}
messages
.
add
(
ValidationMessage
(
_userMessages
.
androidSdkLocation
(
androidSdk
.
directory
.
path
)));
String
?
sdkVersionText
;
final
AndroidSdkVersion
?
androidSdkLatestVersion
=
androidSdk
.
latestVersion
;
if
(
androidSdkLatestVersion
!=
null
)
{
...
...
packages/flutter_tools/test/general.shard/android/android_workflow_test.dart
View file @
2f916790
...
...
@@ -342,7 +342,8 @@ Review licenses that have not been accepted (y/N)?
sdk
..
licensesAvailable
=
true
..
platformToolsAvailable
=
false
..
cmdlineToolsAvailable
=
true
;
..
cmdlineToolsAvailable
=
true
..
directory
=
fileSystem
.
directory
(
'/foo/bar'
);
final
ValidationResult
validationResult
=
await
AndroidValidator
(
androidStudio:
null
,
androidSdk:
sdk
,
...
...
@@ -354,10 +355,14 @@ Review licenses that have not been accepted (y/N)?
).
validate
();
expect
(
validationResult
.
type
,
ValidationType
.
partial
);
expect
(
validationResult
.
messages
.
map
((
ValidationMessage
message
)
=>
message
.
message
),
contains
(
contains
(
UserMessages
().
androidSdkLicenseOnly
(
kAndroidHome
))),
);
final
ValidationMessage
sdkMessage
=
validationResult
.
messages
.
first
;
expect
(
sdkMessage
.
type
,
ValidationMessageType
.
information
);
expect
(
sdkMessage
.
message
,
'Android SDK at /foo/bar'
);
final
ValidationMessage
licenseMessage
=
validationResult
.
messages
.
last
;
expect
(
licenseMessage
.
type
,
ValidationMessageType
.
hint
);
expect
(
licenseMessage
.
message
,
UserMessages
().
androidSdkLicenseOnly
(
kAndroidHome
));
});
testWithoutContext
(
'detects minimum required SDK and buildtools'
,
()
async
{
...
...
@@ -432,7 +437,8 @@ Review licenses that have not been accepted (y/N)?
sdk
..
licensesAvailable
=
true
..
platformToolsAvailable
=
true
..
cmdlineToolsAvailable
=
false
;
..
cmdlineToolsAvailable
=
false
..
directory
=
fileSystem
.
directory
(
'/foo/bar'
);
final
AndroidValidator
androidValidator
=
AndroidValidator
(
androidStudio:
null
,
...
...
@@ -448,10 +454,14 @@ Review licenses that have not been accepted (y/N)?
final
ValidationResult
validationResult
=
await
androidValidator
.
validate
();
expect
(
validationResult
.
type
,
ValidationType
.
missing
);
expect
(
validationResult
.
messages
.
last
.
message
,
errorMessage
,
);
final
ValidationMessage
sdkMessage
=
validationResult
.
messages
.
first
;
expect
(
sdkMessage
.
type
,
ValidationMessageType
.
information
);
expect
(
sdkMessage
.
message
,
'Android SDK at /foo/bar'
);
final
ValidationMessage
cmdlineMessage
=
validationResult
.
messages
.
last
;
expect
(
cmdlineMessage
.
type
,
ValidationMessageType
.
error
);
expect
(
cmdlineMessage
.
message
,
errorMessage
);
});
testWithoutContext
(
'detects minimum required java version'
,
()
async
{
...
...
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