@@ -246,6 +246,9 @@ def make_package(args):
246246 print 'Invalid --ouya-category argument. should be one of GAME or APP'
247247 sys .exit (- 1 )
248248
249+ # Get target android API
250+ android_api = int (os .environ .get ('ANDROIDAPI' , '8' ))
251+
249252 # Render the various templates into control files.
250253 render (
251254 'AndroidManifest.tmpl.xml' ,
@@ -255,7 +258,7 @@ def make_package(args):
255258 url_scheme = url_scheme ,
256259 intent_filters = intent_filters ,
257260 manifest_extra = manifest_extra ,
258- )
261+ android_api = android_api )
259262
260263 render (
261264 'Configuration.tmpl.java' ,
@@ -277,9 +280,9 @@ def make_package(args):
277280 args = args )
278281
279282 # Update the project to a recent version.
280- android_api = 'android-%s' % os .environ .get ('ANDROIDAPI' , '8' )
281283 try :
282- subprocess .call ([ANDROID , 'update' , 'project' , '-p' , '.' , '-t' , android_api ])
284+ subprocess .call ([ANDROID , 'update' , 'project' , '-p' , '.' , '-t' ,
285+ 'android-{}' .format (android_api )])
283286 except (OSError , IOError ):
284287 print 'An error occured while calling' , ANDROID , 'update'
285288 print 'Your PATH must include android tools.'
0 commit comments