From 75a41215e34171abe1f5f6310dc6543d1f2ecd04 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 18 May 2021 15:53:20 -0700 Subject: [PATCH] Add instruction to edit project view in SDK error message 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 --- .../blaze/android/sync/sdk/AndroidSdkFromProjectView.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aswb/src/com/google/idea/blaze/android/sync/sdk/AndroidSdkFromProjectView.java b/aswb/src/com/google/idea/blaze/android/sync/sdk/AndroidSdkFromProjectView.java index eb9079265d7..220fe4a2bce 100644 --- a/aswb/src/com/google/idea/blaze/android/sync/sdk/AndroidSdkFromProjectView.java +++ b/aswb/src/com/google/idea/blaze/android/sync/sdk/AndroidSdkFromProjectView.java @@ -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;