m_pUILayer = Layer::create(); m_pUILayer->scheduleUpdate(); addChild(m_pUILayer); // register root from json m_pLayout = dynamic_cast<Layout*>(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("DemoLogin\\DemoLogin.ExportJson")); m_pUILayer->addChild(m_pLayout); _displayValueLabel = static_cast<Text*>(Helper::seekWidgetByName(m_pLayout, "name_TextField")); _displayValueLabel->setText("te"); 试试