diff --git a/android/cli/commands/_buildModule.js b/android/cli/commands/_buildModule.js index 30e6f003cf5..ee4a11906fa 100644 --- a/android/cli/commands/_buildModule.js +++ b/android/cli/commands/_buildModule.js @@ -33,6 +33,8 @@ const androidDetect = require('../lib/detect').detect, __ = appc.i18n(__dirname).__, version = appc.version; +let tiSdkVersion = '12.6.0.GA'; + function AndroidModuleBuilder() { Builder.apply(this, arguments); @@ -58,6 +60,7 @@ AndroidModuleBuilder.prototype.migrate = async function migrate() { const manifestModuleAPIVersion = this.manifest.apiversion; const manifestTemplateFile = path.join(this.platformPath, 'templates', 'module', 'default', 'template', 'android', 'manifest.ejs'); let newVersion = semver.inc(this.manifest.version, 'major'); + tiSdkVersion = cliSDKVersion; // Determine if the "manifest" file's "apiversion" needs updating. let isApiVersionUpdateRequired = false; @@ -873,6 +876,7 @@ AndroidModuleBuilder.prototype.runModule = async function (cli) { '-u', 'localhost', '-d', tmpDir, '-p', 'android', + '--sdk', tiSdkVersion, '--force' ], this.logger @@ -917,7 +921,7 @@ AndroidModuleBuilder.prototype.runModule = async function (cli) { // Run the temp app. this.logger.debug(__('Running example project...', tmpDir.cyan)); - let buildArgs = [ process.argv[1], 'build', '-p', 'android', '-d', tmpProjectDir ]; + let buildArgs = [ process.argv[1], 'build', '-p', 'android', '-d', tmpProjectDir, '--sdk', tiSdkVersion ]; if (this.target) { buildArgs.push('-T'); buildArgs.push(this.target);