[AC-2858] Error when preparing for running on Android emulator or device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-09T14:27:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Studio |
Labels | android, builder.py, runtime, studio |
Reporter | Thomas Amsler |
Assignee | Ian Howarth |
Created | 2012-04-04T08:23:45.000+0000 |
Updated | 2016-03-08T07:47:48.000+0000 |
Description
When I try to run the project on an Android device or emulator, I am getting the following error:
Traceback (most recent call last): File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/builder.py", line 2065, in s = Builder(project_name,sdk_dir,project_dir,template_dir,app_id) File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/builder.py", line 244, in init android_creator.create(parent_dir, project_dir=self.top_dir, build_time=True) File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/android.py", line 304, in create app_properties = self.app_properties, app_info = self.app_info) File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/android.py", line 114, in render f.write(tmpl.render(config = self.config, **kwargs)) File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/mako/template.py", line 133, in render return runtime.render(self, self.callable, args, data) File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/mako/runtime.py", line 347, in render _render_context(template, callable, context, *args, **_kwargs_for_callable(callable_, data)) File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/mako/runtime.py", line 364, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/Users/tamsler/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/mako/runtime.py", line 397, in _exec_template callable_(context, *args, **kwargs) File "_Users_tamsler_Library_Application_Support_Titanium_mobilesdk_osx_1_8_2_android_templates_AppInfo_java", line 103, in render_body KeyError: 'analytics'
I am not getting any errors when running the code on the iOS emulator.
Hello, is this happening with any project? or just one in particular? Can you please create a new mobile project and test? Best, Mauro
I am able to create a new project and the error doesn't happen there. It's seems that the error only occurs in my specific project.
I found the issue. For some reason, the tiapp.xml file had a missing
Maybe the tiapp.xml XML validation needs some adjustment (DTD) so that it shows more meaningful errors.