模拟器上运行没问题打包安卓工程 所有的pfefab 挂载的脚本丢失 getComponent: Type must be non-nil

  • Creator 版本:2.4.13

  • 目标平台:Android 平台

  • 重现方式:项目从2.3.2升级到2.4.13 编译之后 所有涉及到的prefab 只要挂载脚本 就报错 点击按钮JS: [ERROR]: getComponent: Type must be non-nil

  • 首个报错:

  • 之前哪个版本是正常的: 之前没编译过Android工程

  • 手机型号:

  • 手机浏览器:

  • 编辑器操作系统:

  • 重现概率: 必现

cc.Class({
extends: cc.Component,

properties: {
   
    scrollView: {
        default: null,
        type: cc.ScrollView
    },
    node_item: {
        default: null,
        type: cc.Node
    },

    con:cc.Label,
    t:cc.Label,
},

// LIFE-CYCLE CALLBACKS:

// onLoad () {},

start () {

},
closeM(){
    // this.node.destroy();
    // this.node.setScale(0.5);
    console.log('--------此处 打印一下')
},

// update (dt) {},

});

这是挂载的脚本 啥逻辑都没写 点击按钮 直接报错