You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to changes in Android SDK, we have to update the checks in CLI. While gathering system information, we check the android executable, which is no longer returning correct results.
We use the android executable to find information about installed Android SDKs and to construct correct paths based on ANDROID_HOME. Fix this by listing directories inside ANDROID_HOME and find the information about installed SDKs from there.
Fix messages pointing to `android` executable to point to `sdkmanager` (in case it exists).
In order to fix this, we rely on the emulator executable, which is the real thing we need as it is the one that allows us to work with Android Emulators (this is changed in mobile-cli-lib).
Fix sys-info checks and get correct path to emulator according to latest changes.
this.printMessage(`Unable to find "${this.androidExecutableName}" executable file. Make sure you have set ANDROID_HOME environment variable correctly.`);
49
-
}
50
-
}else{
51
-
this.$logger.trace("ANDROID_HOME environment variable is not set correctly.");
this.printMessage(`Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK ${AndroidToolsInfo.MIN_REQUIRED_COMPILE_TARGET} or later.`,
100
-
"Run `$ android` to manage your Android SDK versions.");
62
+
`Run \`\$ ${this.getPathToSdkManagementTool()}\` to manage your Android SDK versions.`);
101
63
detectedErrors=true;
102
64
}
103
65
@@ -111,7 +73,7 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
111
73
message=`You have to install version ${versionRangeMatches[1]}.`;
112
74
}
113
75
114
-
letinvalidBuildToolsAdditionalMsg='Run `android` from your command-line to install required `Android Build Tools`.';
76
+
letinvalidBuildToolsAdditionalMsg=`Run \`\$ ${this.getPathToSdkManagementTool()}\` from your command-line to install required \`Android Build Tools\`.`;
115
77
if(!isAndroidHomeValid){
116
78
invalidBuildToolsAdditionalMsg+=' In case you already have them installed, make sure `ANDROID_HOME` environment variable is set correctly.';
117
79
}
@@ -121,7 +83,7 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
121
83
}
122
84
123
85
if(!toolsInfoData.supportRepositoryVersion){
124
-
letinvalidSupportLibAdditionalMsg='Run `$ android` to manage the Android Support Repository.';
86
+
letinvalidSupportLibAdditionalMsg=`Run \`\$ ${this.getPathToSdkManagementTool()}\` to manage the Android Support Repository.`;
125
87
if(!isAndroidHomeValid){
126
88
invalidSupportLibAdditionalMsg+=' In case you already have it installed, make sure `ANDROID_HOME` environment variable is set correctly.';
127
89
}
@@ -153,6 +115,7 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
letadditionalMessage="You will not be able to build your projects for Android."+EOL
157
120
+"To be able to build for Android, verify that you have installed The Java Development Kit (JDK) and configured it according to system requirements as"+EOL+
158
121
" described in "+this.$staticConfig.SYS_REQUIREMENTS_LINK;
@@ -186,6 +149,28 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
this.printMessage("The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android.",
161
+
"To be able to perform Android build-related operations, set the `ANDROID_HOME` variable to point to the root of your Android SDK installation directory.");
this.printMessage("The ANDROID_HOME environment variable points to incorrect directory. You will not be able to perform any build-related operations for Android.",
165
+
"To be able to perform Android build-related operations, set the `ANDROID_HOME` variable to point to the root of your Android SDK installation directory, "+
166
+
"where you will find `tools` and `platform-tools` directories.");
167
+
this._cachedAndroidHomeValidationResult=false;
168
+
}
169
+
}
170
+
171
+
returnthis._cachedAndroidHomeValidationResult;
172
+
}
173
+
189
174
privateshouldGenerateTypings(): boolean{
190
175
returnthis.$options.androidTypings;
191
176
}
@@ -318,44 +303,23 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
this.printMessage("The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android.",
348
-
"To be able to perform Android build-related operations, set the `ANDROID_HOME` variable to point to the root of your Android SDK installation directory.");
this.printMessage("The ANDROID_HOME environment variable points to incorrect directory. You will not be able to perform any build-related operations for Android.",
352
-
"To be able to perform Android build-related operations, set the `ANDROID_HOME` variable to point to the root of your Android SDK installation directory, "+
353
-
"where you will find `tools` and `platform-tools` directories.");
0 commit comments