diff options
author | Xavier Ducrohet <xav@android.com> | 2010-02-01 15:12:56 -0800 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2010-02-01 15:12:56 -0800 |
commit | 3af42826295585224775fa95f6071537b8b24f5f (patch) | |
tree | 4c0ea678cb3c416afe623f83b42c3cd91795e95c /sdkmanager/app/src/com | |
parent | f89bdfe5b20157a284bf374d4d2e067e3ae2b9d8 (diff) | |
download | sdk-3af42826295585224775fa95f6071537b8b24f5f.zip sdk-3af42826295585224775fa95f6071537b8b24f5f.tar.gz sdk-3af42826295585224775fa95f6071537b8b24f5f.tar.bz2 |
Fix 'android create test-project' to handle parent projects with missing default.prop
Bug: 2411562
Change-Id: Ia22491d56dfa3c5dda700782c28a2bcbfeebd266
Diffstat (limited to 'sdkmanager/app/src/com')
-rw-r--r-- | sdkmanager/app/src/com/android/sdkmanager/Main.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sdkmanager/app/src/com/android/sdkmanager/Main.java b/sdkmanager/app/src/com/android/sdkmanager/Main.java index 8084693..7f49ea3 100644 --- a/sdkmanager/app/src/com/android/sdkmanager/Main.java +++ b/sdkmanager/app/src/com/android/sdkmanager/Main.java @@ -414,6 +414,12 @@ public class Main { // now get the target hash ProjectProperties p = ProjectProperties.load(parentProject.getAbsolutePath(), PropertyType.DEFAULT); + if (p == null) { + errorAndExit("Unable to load the main project's %1$s", + PropertyType.DEFAULT.getFilename()); + return; + } + String targetHash = p.getProperty(ProjectProperties.PROPERTY_TARGET); if (targetHash == null) { errorAndExit("Couldn't find the main project target"); @@ -511,7 +517,7 @@ public class Main { } if (couldHaveDone) { - mSdkLog.printf("It seems that there are sub-projects. If you want to update them\nplease use the --%1$s parameter.", + mSdkLog.printf("It seems that there are sub-projects. If you want to update them\nplease use the --%1$s parameter.\n", SdkCommandLine.KEY_SUBPROJECTS); } } |