This question is locked. New answers and comments are not allowed.
Hay, I tried using the AppBuilder-CLI on my Linux like this inside project directory:
$ appbuilder emulate android
got error image "cannot be found".
so I looked into appbuilder code, specifically:
/usr/lib64/node_modules/appbuilder/lib/commands/emulate.js
and found this code:
var EmulateAndroidCommand = (function () {
function EmulateAndroidCommand($project, $projectTypes, $buildService, $androidEmulatorServices) {
this.$project = $project;
this.$projectTypes = $projectTypes;
this.$buildService = $buildService;
this.$androidEmulatorServices = $androidEmulatorServices;
}
EmulateAndroidCommand.prototype.execute = function (args) {
var _this = this;
return (function () {
_this.$androidEmulatorServices.checkAvailability().wait();
var tempDir = _this.$project.getTempDir("emulatorfiles").wait();
var packageFilePath = path.join(tempDir, "package.apk");
var packageDefs = _this.$buildService.build({
platform: MobileHelper.DevicePlatforms[1 /* Android */],
configuration: "Debug",
showQrCodes: false,
downloadFiles: true,
downloadedFilePath: packageFilePath
}).wait();
console.log(args[0]);
var image = args[1];
var appId = AppIdentifier.createAppIdentifier(MobileHelper.DevicePlatforms[1 /* Android */], _this.$project.projectData.AppIdentifier, options.companion, _this.$project.projectType);
_this.$androidEmulatorServices.startEmulator(packageFilePath, { image: image, appId: appId.appIdentifier }).wait();
}).future()();
};
return EmulateAndroidCommand;
})();
looking ahead, it turn out the command I was looking for is actually:
$ appbuilder emulate android Emu1
but, my image is in args[0] not args[1].
so I made the following change, var image = args[0]; and the correct emulator showed up running the same command.
I will also note there's no documentation of this not in application help and not the Telerik site.
$ appbuilder emulate android
got error image "cannot be found".
so I looked into appbuilder code, specifically:
/usr/lib64/node_modules/appbuilder/lib/commands/emulate.js
and found this code:
var EmulateAndroidCommand = (function () {
function EmulateAndroidCommand($project, $projectTypes, $buildService, $androidEmulatorServices) {
this.$project = $project;
this.$projectTypes = $projectTypes;
this.$buildService = $buildService;
this.$androidEmulatorServices = $androidEmulatorServices;
}
EmulateAndroidCommand.prototype.execute = function (args) {
var _this = this;
return (function () {
_this.$androidEmulatorServices.checkAvailability().wait();
var tempDir = _this.$project.getTempDir("emulatorfiles").wait();
var packageFilePath = path.join(tempDir, "package.apk");
var packageDefs = _this.$buildService.build({
platform: MobileHelper.DevicePlatforms[1 /* Android */],
configuration: "Debug",
showQrCodes: false,
downloadFiles: true,
downloadedFilePath: packageFilePath
}).wait();
console.log(args[0]);
var image = args[1];
var appId = AppIdentifier.createAppIdentifier(MobileHelper.DevicePlatforms[1 /* Android */], _this.$project.projectData.AppIdentifier, options.companion, _this.$project.projectType);
_this.$androidEmulatorServices.startEmulator(packageFilePath, { image: image, appId: appId.appIdentifier }).wait();
}).future()();
};
return EmulateAndroidCommand;
})();
looking ahead, it turn out the command I was looking for is actually:
$ appbuilder emulate android Emu1
but, my image is in args[0] not args[1].
so I made the following change, var image = args[0]; and the correct emulator showed up running the same command.
I will also note there's no documentation of this not in application help and not the Telerik site.