Background-http plugin with TypeError: Cannot read property 'extend' of undefined


When I use background-http plugin during running application I’ve got error:

TypeError: Cannot read property ‘extend’ of undefined

Which appears in

line with code


"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var application = require("application");
var data_observable = require("data/observable");
var utils = require("utils/utils");
var fileSystemModule = require("file-system");
var ProgressReceiver = net.gotev.uploadservice.UploadServiceBroadcastReceiver.extend({
    onProgress: function (uploadInfo) {
        var uploadId = uploadInfo.getUploadId();
        var task = Task.fromId(uploadId);
        var totalBytes = uploadInfo.getTotalBytes();
        var currentBytes = uploadInfo.getUploadedBytes();
        task.notify({ eventName: "progress", object: task, currentBytes: currentBytes, totalBytes: totalBytes });

How fix it?


May be the gradle dependency was not installed properly. Did you try a clean build after installing the plugin?


It works :slight_smile: thx