aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse/plugins')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java
index 2c8d87b..d350a00 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java
@@ -23,6 +23,7 @@ import com.android.annotations.VisibleForTesting;
import com.android.assetstudiolib.GraphicGenerator;
import com.android.ide.eclipse.adt.AdtPlugin;
import com.android.ide.eclipse.adt.AdtUtils;
+import com.android.ide.eclipse.adt.internal.actions.AddSupportJarAction;
import com.android.ide.eclipse.adt.internal.assetstudio.AssetType;
import com.android.ide.eclipse.adt.internal.assetstudio.ConfigureAssetSetPage;
import com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState;
@@ -271,8 +272,14 @@ public class NewProjectWizard extends TemplateWizard {
TemplateHandler.addDirectoryParameters(paramMap, getProject());
// We don't know at this point whether the activity is going to need
// AppCompat so we just assume that it will.
- if (mValues.createActivity) {
+ if (mValues.createActivity && mValues.minSdkLevel < 14) {
paramMap.put(ATTR_APP_COMPAT, true);
+ getFinalizingActions().add(new Runnable() {
+ @Override
+ public void run() {
+ AddSupportJarAction.installAppCompatLibrary(mProject, true);
+ }
+ });
}
return template.render(mProject, paramMap);