create new project doesn't work

Issue #9 resolved
qushay created an issue

why its doesn't work if i choose "New Android Project"? after input "Aplication Name", doesn't run anything.

Comments (2)

  1. Richard Jones

    The core of the problem is that get_android_versions doesn't handle android_sdk_path with no trailing '/'. The following addresses that but also simplifies the subsequent parsing as well:

        def get_android_versions(self):
            self.versionsHeaders = []
            self.versions = []
            settings = sublime.load_settings('Andrew.sublime-settings')
            cmd_a = os.path.join(settings.get('android_sdk_path'), 'tools', 'android')
            p = subprocess.Popen(cmd_a + ' list | grep -A 1 "android-"',
                stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
            if p.stdout is not None:
                msg = p.stdout.read()
                for version, name in re.findall(r'"(android-[0-9]+)"\s*Name: ([a-zA-Z0-9\ \.]*)', msg):
                    self.versions.append(version)
                    self.versionsHeaders.append([name, version])
            return self.versionsHeaders
    
  2. Log in to comment