这是什么问题?

11-30 00:53:22.026 2473-2545/org.cocos2d.moster E/jswrapper: [ERROR] Failed to invoke require, location: D:/development/cocos/CocosCreator/moster/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/manual/jsb_global.cpp:236
ERROR: Uncaught TypeError: Cannot set property ‘enabled’ of undefined, location: src/project.js:0:0
STACK:
[0]ctor@src/project.js:404
[1]CCClass@(no filename):4,分明没有enable属性啊,打包android的时候出问题了???@引擎团队

难道升级了下就不能这么用了?

我在loading的时候初始化我的 MyApp,挂到window上现在不能这么用了吗?
Failed to invoke require, location: D:/development/cocos/CocosCreator/moster/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/manual/jsb_global.cpp:236
ERROR: Uncaught TypeError: Cannot set property ‘enabled’ of undefined, location: src/project.js:0:0
STACK:
[0]ctor@src/project.js:404

let MyApp = require('MyApp')
window.app = new MyApp();
app.init();
源文件
let __DEBUG__ = true;
let Configuration = {
    __BASIC__REQUEST__URL__:__DEBUG__ === true ? "http://127.0.0.1:16888":"http://127.0.0.1:17777",
}

let MyApp = cc.Class({
    name:"MyApp",
    ctor:function(){
        cc.director.getCollisionManager().enabled = true;
        // cc.director.getCollisionManager().enabledDebugDraw = true;
        // cc.director.getCollisionManager().enabledDrawBoundingBox = true;

        this.Configuration = Configuration;
    },

    init:function(){
        this.initUtils();
        this.initSystem();
        this.initNetwork();
    },

    initUtils: function(){
        this.Helper = new (require('Helper'))();
        this.Platform = new (require('Platform'))();
        this.GameEvent = new (require('GameEvent'))();
        this.NetworkEvent = new (require('NetworkEvent'))();
    },

    initSystem: function(){
        let systems = ['NetworkSystem', 'LoginSystem', 'GameSystem'];
        for (let index = 0; index < systems.length; index++) {
            this[systems[index]] = new (require(systems[index]))();         
        }
    },

    initNetwork: function(){
        this.HttpClient = new (require('HttpClient'))();
    }
});

module.exports = MyApp;

最好在组件的onload方法里面去调用,你这边MyApp调用ctor函数时,物理引擎应该还没初始化。