Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3911] Android: Creating a Module Fails if android-4 Not Available

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2011-05-06T03:56:17.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sRelease 1.7.0, Sprint 2011-18
ComponentsTooling
Labelsn/a
ReporterDon Thorp
AssigneeBill Dawson
Created2011-05-05T16:31:02.000+0000
Updated2011-05-06T10:55:09.000+0000

Description

If the Android SDK API Level 4 android-4 is not available in the tooling. You are unable to create a module, also it prints a success message instead of a failure message. 1) Make sure your titanium command is aliased to the 1.7.0 build (Module docs) 2) If you have android-4 in your platforms, rename the folder so it won't be recognized as installed. 3) At the command line attempt to create a module.
titanium create --platform=android --type=module --name=don01 --id=net.donthorp.don01 --android=/opt/android-sdk
In fail state you get something like
$ titanium create --platform=android --type=module --name=don01 --id=net.donthorp.don01 --android=/opt/android-sdk
Traceback (most recent call last):
File "/Users/dthorp/Library/Application Support/Titanium/mobilesdk/osx/dev-1.7.0/module/module.py", line 319, in <module>
main(sys.argv)
File "/Users/dthorp/Library/Application Support/Titanium/mobilesdk/osx/dev-1.7.0/module/module.py", line 316, in main
module = ModuleProject(config['platform'],project_dir,config)
File "/Users/dthorp/Library/Application Support/Titanium/mobilesdk/osx/dev-1.7.0/module/module.py", line 63, in __init__
self.platform_delegate = ModulePlatform.create_platform(platform, project_dir, config, self)
File "/Users/dthorp/Library/Application Support/Titanium/mobilesdk/osx/dev-1.7.0/module/module.py", line 34, in create_platform
return platform_module_class(project_dir, config, module)
File "/Users/dthorp/Library/Application Support/Titanium/mobilesdk/osx/dev-1.7.0/module/android/android.py", line 21, in __init__
self.sdk = androidsdk.AndroidSDK(module_project.sdk, 4)
File "/Users/dthorp/projects/appcelerator/titanium_mobile/dist/mobilesdk/osx/1.7.0/android/androidsdk.py", line 46, in __init__
self.find_platform_dir()
File "/Users/dthorp/projects/appcelerator/titanium_mobile/dist/mobilesdk/osx/1.7.0/android/androidsdk.py", line 86, in find_platform_dir
raise Exception("No \"%s\" or \"%s\" in the Android SDK" % ('android-%s' % self.api_level, android_api_levels[self.api_level]))
Exception: No "android-4" or "android-1.6" in the Android SDK
Created android module project

Comments

No comments

JSON Source