android: delete the Android project folder prior to generating code
authorAlexis Laferrière <alexis.laf@xymus.net>
Mon, 7 Jul 2014 16:15:18 +0000 (12:15 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 7 Jul 2014 19:45:21 +0000 (15:45 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/android_platform.nit

index 41553eb..ff8ca4c 100644 (file)
@@ -66,6 +66,10 @@ class AndroidToolchain
                var app_version = project.version
                if app_version == null then app_version = "1.0"
 
+               # Clear the previous android project, so there is no "existing project warning"
+               # or conflict between Java files of different projects
+               if android_project_root.file_exists then android_project_root.rmdir
+
                var args = ["android", "-s",
                        "create", "project",
                        "--name", short_project_name,