diff --git a/lib/devices/android/android.js b/lib/devices/android/android.js index 678d5ebae..343faf3a1 100644 --- a/lib/devices/android/android.js +++ b/lib/devices/android/android.js @@ -294,8 +294,11 @@ Android.prototype.pushStrings = function (cb) { logger.debug(makeStrings); exec(makeStrings, { maxBuffer: 524288 }, function (err, stdout, stderr) { if (err) { + // if we can't get strings, just dump an empty json and continue + logger.warn("Error getting strings.xml from apk"); logger.debug(stderr); - return cb(new Error("Could not make strings from apk")); + var remoteFile = path.resolve(remotePath, stringsJson); + return this.adb.shell("echo '{}' > " + remoteFile, cb); } var jsonFile = path.resolve(outputPath, stringsJson); this.adb.push(jsonFile, remotePath, function (err) { diff --git a/test/functional/android/apidemos/desired.js b/test/functional/android/apidemos/desired.js index c32701df1..1aad2c8b2 100644 --- a/test/functional/android/apidemos/desired.js +++ b/test/functional/android/apidemos/desired.js @@ -3,7 +3,8 @@ var getAppPath = require('../../../helpers/app').getAppPath; module.exports = { - app: getAppPath('ApiDemos'), + app: getAppPath('ApiDemos', 'android'), + device: 'Android', 'app-package': 'com.example.android.apis', 'app-activity': '.ApiDemos' }; diff --git a/test/helpers/app.js b/test/helpers/app.js index 343d93933..06434f3cd 100644 --- a/test/helpers/app.js +++ b/test/helpers/app.js @@ -3,7 +3,14 @@ var env = require('./env'), path = require('path'); -module.exports.getAppPath = function (app) { +module.exports.getAppPath = function (app, device) { + if (device && device[0] === "i") { + env.IOS = true; + env.ANDROID = false; + } else if (device && device.toLowerCase() === "android") { + env.ANDROID = true; + env.IOS = false; + } if (env.IOS) { return path.resolve(__dirname, "../../sample-code/apps/" + app + "/build/Release-iphonesimulator/" + app + ".app");