@@ -58,13 +58,13 @@ class AndroidSDK {
58
58
final static private int TEXT_MARGIN = Toolkit .zoom (8 );
59
59
final static private int TEXT_WIDTH = Toolkit .zoom (300 );
60
60
61
- private final File folder ;
62
- private final File tools ;
61
+ private final File folder ;
63
62
private final File platforms ;
64
63
private final File highestPlatform ;
65
64
private final File androidJar ;
66
65
private final File platformTools ;
67
66
private final File buildTools ;
67
+ private final File cmdlineTools ;
68
68
private final File avdManager ;
69
69
private final File sdkManager ;
70
70
private final File emulator ;
@@ -99,8 +99,8 @@ public AndroidSDK(File folder) throws BadSDKException, IOException {
99
99
throw new BadSDKException (AndroidMode .getTextString ("android_sdk.error.missing_sdk_folder" , folder ));
100
100
}
101
101
102
- tools = new File (folder , "tools" );
103
- if (!tools .exists ()) {
102
+ cmdlineTools = new File (folder , "cmdline- tools" );
103
+ if (!cmdlineTools .exists ()) {
104
104
throw new BadSDKException (AndroidMode .getTextString ("android_sdk.error.missing_tools_folder" , folder ));
105
105
}
106
106
@@ -141,23 +141,23 @@ public AndroidSDK(File folder) throws BadSDKException, IOException {
141
141
AndroidBuild .TARGET_SDK , highestPlatform .getAbsolutePath ()));
142
142
}
143
143
144
- avdManager = findCliTool (new File (tools , "bin" ), "avdmanager" );
145
- sdkManager = findCliTool (new File (tools , "bin" ), "sdkmanager" );
144
+ avdManager = findCliTool (new File (cmdlineTools , "bin" ), "avdmanager" );
145
+ sdkManager = findCliTool (new File (cmdlineTools , "bin" ), "sdkmanager" );
146
146
147
147
File emuFolder = new File (folder , "emulator" );
148
148
if (emuFolder .exists ()) {
149
149
// First try the new location of the emulator inside its own folder
150
150
emulator = findCliTool (emuFolder , "emulator" );
151
151
} else {
152
152
// If not found, use old location inside tools
153
- emulator = findCliTool (tools , "emulator" );
153
+ emulator = findCliTool (cmdlineTools , "emulator" );
154
154
}
155
155
156
156
String path = Platform .getenv ("PATH" );
157
157
158
158
Platform .setenv ("ANDROID_SDK" , folder .getCanonicalPath ());
159
159
path = platformTools .getCanonicalPath () + File .pathSeparator +
160
- tools .getCanonicalPath () + File .pathSeparator + path ;
160
+ cmdlineTools .getCanonicalPath () + File .pathSeparator + path ;
161
161
162
162
String javaHomeProp = System .getProperty ("java.home" );
163
163
File javaHome = new File (javaHomeProp ).getCanonicalFile ();
@@ -243,8 +243,8 @@ public File getAndroidJarPath() {
243
243
}
244
244
245
245
246
- public File getToolsFolder () {
247
- return tools ;
246
+ public File getCommandLineToolsFolder () {
247
+ return cmdlineTools ;
248
248
}
249
249
250
250
0 commit comments