aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2009-08-12 17:57:35 -0700
committerXavier Ducrohet <xav@android.com>2009-08-12 17:57:35 -0700
commitb2e2489d2681b867c5ac24f58a9112e50145cc28 (patch)
tree09cbec9f764db9e7e6f4254373e88a44bcfab6dc
parent28d7fe78211540e2977afb51d2ea8af45bdd08bb (diff)
downloadsdk-b2e2489d2681b867c5ac24f58a9112e50145cc28.zip
sdk-b2e2489d2681b867c5ac24f58a9112e50145cc28.tar.gz
sdk-b2e2489d2681b867c5ac24f58a9112e50145cc28.tar.bz2
Also display error on empty minSdkVersion for preview targets.
BUG: 2050928
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/PreCompilerBuilder.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/PreCompilerBuilder.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/PreCompilerBuilder.java
index 2f733fa..ae5583d 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/PreCompilerBuilder.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/PreCompilerBuilder.java
@@ -335,9 +335,8 @@ public class PreCompilerBuilder extends BaseBuilder {
if (codename != null) {
// integer minSdk when the target is a preview => fatal error
String msg = String.format(
- "Platform %1$s is a preview and requires appication manifests to set %2$s to '%3$s'",
- codename, ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION,
- codename);
+ "Platform %1$s is a preview and requires appication manifests to set %2$s to '%1$s'",
+ codename, ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION);
AdtPlugin.printErrorToConsole(project, msg);
BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
IMarker.SEVERITY_ERROR);
@@ -375,6 +374,17 @@ public class PreCompilerBuilder extends BaseBuilder {
stopBuild(msg);
}
}
+ } else if (projectTarget.getVersion().isPreview()) {
+ // else the minSdkVersion is not set but we are using a preview target.
+ // Display an error
+ String codename = projectTarget.getVersion().getCodename();
+ String msg = String.format(
+ "Platform %1$s is a preview and requires appication manifests to set %2$s to '%1$s'",
+ codename, ManifestConstants.ATTRIBUTE_MIN_SDK_VERSION);
+ AdtPlugin.printErrorToConsole(project, msg);
+ BaseProjectHelper.addMarker(manifest, AdtConstants.MARKER_ADT, msg,
+ IMarker.SEVERITY_ERROR);
+ stopBuild(msg);
}
if (javaPackage == null || javaPackage.length() == 0) {