Skip to content

Commit 5539ddb

Browse files
committed
Added check for fetching build tools according to target platform
1 parent bd2ce1e commit 5539ddb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/processing/mode/android/SDKDownloader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ private void getMainDownloadUrls(SDKUrlHolder urlHolder,
288288
String major = (((Element) revision.item(0)).getElementsByTagName("major")).item(0).getTextContent();
289289
String minor = (((Element) revision.item(0)).getElementsByTagName("minor")).item(0).getTextContent();
290290
String micro = (((Element) revision.item(0)).getElementsByTagName("micro")).item(0).getTextContent();
291+
if(!major.equals(AndroidBuild.TARGET_SDK)) // Allows only the latest build tools for the target platform
292+
continue;
291293
urlHolder.buildToolsVersion = major + "." + minor + "." + micro;
292294

293295
NodeList archives = ((Element) childNodes).getElementsByTagName("archive");

0 commit comments

Comments
 (0)