aboutsummaryrefslogtreecommitdiffstats
path: root/anttasks/src/com/android/ant/SetupTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'anttasks/src/com/android/ant/SetupTask.java')
-rw-r--r--anttasks/src/com/android/ant/SetupTask.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/anttasks/src/com/android/ant/SetupTask.java b/anttasks/src/com/android/ant/SetupTask.java
index ba62403..4f14d62 100644
--- a/anttasks/src/com/android/ant/SetupTask.java
+++ b/anttasks/src/com/android/ant/SetupTask.java
@@ -92,6 +92,17 @@ public final class SetupTask extends ImportTask {
System.out.println("Android SDK Tools Revision " + toolsRevison);
}
+ // detect that the platform tools is there.
+ File platformTools = new File(sdkDir, SdkConstants.FD_PLATFORM_TOOLS);
+ if (platformTools.isDirectory() == false) {
+ throw new BuildException(String.format(
+ "SDK Platform Tools component is missing. " +
+ "Please install it with the SDK Manager (%1$s%2$c%3$s)",
+ SdkConstants.FD_TOOLS,
+ File.separatorChar,
+ SdkConstants.androidCmdName()));
+ }
+
// get the target property value
String targetHashString = antProject.getProperty(ProjectProperties.PROPERTY_TARGET);