Skip to content

Commit

Permalink
Add instruction to edit project view in SDK error message
Browse files Browse the repository at this point in the history
Currently when no android SDKs are configured in project view, the
user is shown an error message during sync to add an SDK, but no
instruction on how to do so.  This CL makes the error message more
user friendly.

PiperOrigin-RevId: 374523256
  • Loading branch information
Googler authored and copybara-github committed May 18, 2021
1 parent f1eebf2 commit 75a4121
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ public boolean canNavigateToSource() {
if (androidSdk == null) {
ProjectViewFile projectViewFile = projectViewSet.getTopLevelProjectViewFile();
IssueOutput.error(
("No android_sdk_platform set. Please set to an android platform. "
+ "Available android_sdk_platforms are: "
+ getAvailableTargetHashesAsList(sdks)))
("No android platform configured, please select one using the `android_sdk_platform`"
+ " flag in the project view file. Available android_sdk_platforms are: "
+ getAvailableTargetHashesAsList(sdks)
+ ". To install more android SDKs, use the SDK manager."))
.inFile(projectViewFile != null ? projectViewFile.projectViewFile : null)
.submit(context);
return null;
Expand Down

0 comments on commit 75a4121

Please # to comment.