@@ -246,6 +246,9 @@ def make_package(args):
246
246
print 'Invalid --ouya-category argument. should be one of GAME or APP'
247
247
sys .exit (- 1 )
248
248
249
+ # Get target android API
250
+ android_api = int (os .environ .get ('ANDROIDAPI' , '8' ))
251
+
249
252
# Render the various templates into control files.
250
253
render (
251
254
'AndroidManifest.tmpl.xml' ,
@@ -255,7 +258,7 @@ def make_package(args):
255
258
url_scheme = url_scheme ,
256
259
intent_filters = intent_filters ,
257
260
manifest_extra = manifest_extra ,
258
- )
261
+ android_api = android_api )
259
262
260
263
render (
261
264
'Configuration.tmpl.java' ,
@@ -277,9 +280,9 @@ def make_package(args):
277
280
args = args )
278
281
279
282
# Update the project to a recent version.
280
- android_api = 'android-%s' % os .environ .get ('ANDROIDAPI' , '8' )
281
283
try :
282
- subprocess .call ([ANDROID , 'update' , 'project' , '-p' , '.' , '-t' , android_api ])
284
+ subprocess .call ([ANDROID , 'update' , 'project' , '-p' , '.' , '-t' ,
285
+ 'android-{}' .format (android_api )])
283
286
except (OSError , IOError ):
284
287
print 'An error occured while calling' , ANDROID , 'update'
285
288
print 'Your PATH must include android tools.'
0 commit comments