使用rapidjson时,报No matching constructor for initialization错误

各路大神,求教:
我使用rapidjson时,报以下错误:
/Applications/Cocos/frameworks/cocos2d-x-3.8/external/json/document.h:1038:22: No matching constructor for initialization of ‘rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator >’

break的地方如下:

我使用的代码如下:
rapidjson::Document document;
document.SetObject();

rapidjson::Document::AllocatorType& allocator = document.GetAllocator();

document.AddMember("deviceUUID", getDeviceUUID(), allocator);
document.AddMember("deviceINFO", getDeviceINFO(), allocator);
document.AddMember("systemINFO", getSystemINFO(), allocator);
document.AddMember("systemVerion", getSystemVersion(), allocator);
document.AddMember("localINFO", getLocalINFO(), allocator);
document.AddMember("messageType", getMessageType(), allocator);
document.AddMember("token", getToken(), allocator);
document.AddMember("userID", getUserID(), allocator);
document.AddMember("timeStamp", getTimeStamp(), allocator);
document.AddMember("platformType", getPlatformType(), allocator);

StringBuffer buffer;
rapidjson::Writer<StringBuffer> writer(buffer);
document.Accept(writer);

解决办法:
rapidjson::Document document;
document.SetObject();

rapidjson::Document::AllocatorType& allocator = document.GetAllocator();

document.AddMember("deviceUUID", rapidjson::Value(getDeviceUUID().c_str(), allocator), allocator);
document.AddMember("deviceINFO", rapidjson::Value(getDeviceINFO().c_str(), allocator), allocator);
document.AddMember("systemINFO", rapidjson::Value(getSystemINFO().c_str(), allocator), allocator);
document.AddMember("systemVerion", rapidjson::Value(getSysVersion().c_str(), allocator), allocator);
document.AddMember("localINFO", rapidjson::Value(getLocalINFO().c_str(), allocator), allocator);
document.AddMember("messageType", rapidjson::Value(getMessageType().c_str(), allocator), allocator);
document.AddMember("token", rapidjson::Value(getToken().c_str(), allocator), allocator);
document.AddMember("userID", rapidjson::Value(getUserID().c_str(), allocator), allocator);
document.AddMember("timeStamp", rapidjson::Value(getTimeStamp().c_str(), allocator), allocator);
document.AddMember("platformType", rapidjson::Value(getPlatformType().c_str(), allocator), allocator);

StringBuffer buffer;
rapidjson::Writer<StringBuffer> writer(buffer);
document.Accept(writer);

我将3.1升级到3.10后遇到了rapidjson问题,调用Addmember函数时,第二个参数好像不能传char类型变量,错误提示:/Users/panxiling/Desktop/MyProject/TestPaper/Classes/Manager/HttpNetManager.cpp:96:33: Calling a private constructor of class ‘rapidjson::GenericStringRef’
请问怎么解决

您好,像您写得这样,还是报楼主一样的错误哦