diff --git a/lib/services/livesync/livesync-service.ts b/lib/services/livesync/livesync-service.ts index 53610d2ff4..8eb83a9c40 100644 --- a/lib/services/livesync/livesync-service.ts +++ b/lib/services/livesync/livesync-service.ts @@ -42,13 +42,14 @@ class LiveSyncService implements ILiveSyncService { public liveSync(platform: string): IFuture { return (() => { platform = this.$liveSyncServiceBase.getPlatform(platform).wait(); - this._isInitialized = true; let platformLowerCase = platform.toLowerCase(); if (!this.$platformService.preparePlatform(platformLowerCase).wait()) { this.$errors.failWithoutHelp("Verify that listed files are well-formed and try again the operation."); } + this._isInitialized = true; // If we want before-prepare hooks to work properly, this should be set after preparePlatform function + let platformData = this.$platformsData.getPlatformData(platformLowerCase); this.ensureAndroidFrameworkVersion(platformData).wait();