我正在使用mapbox制作导航应用。但我正在添加navigation-ui-0.30.0依赖关系。它显示此错误(无法解决:com.mapbox.navigator:mapbox-navigation-native:5.0.0)enter image description here
答案 0 :(得分:1)
您可能在顶级gradle脚本中缺少以下条目:
const parseString = require('xml2js').parseString;
const xmlInput = '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetCurrentRoomStatusGraphResponse xmlns="www.example.com"><GetCurrentRoomStatusGraphResult><RoomStatusGraphItem><RoomID>3</RoomID><ChainID>1</ChainID><RoomNo>8888</RoomNo><RoomTypeID>1</RoomTypeID><RoomTypeCode>DF</RoomTypeCode><RoomTypeName>standard room</RoomTypeName><RoomRate>0.0000</RoomRate><Floor>2</Floor><FolioID>123456</FolioID><Guest><RoomStatusGuest><Name>Jon Snow</Name><Sex>1</Sex><VipTypeID>0</VipTypeID></RoomStatusGuest></Guest><Arrival>2019-03-07T13:43:00</Arrival><Depart>2019-03-08T12:00:00</Depart><IsDepart>false</IsDepart><IsTimeRoom>false</IsTimeRoom><Surreptitious>false</Surreptitious><CheckInState>CheckIn</CheckInState><ClentState>NoClean</ClentState><HouseKeepState>EnableSaleRoom</HouseKeepState><CheckRoomFlag>false</CheckRoomFlag><IsBookInRoom>false</IsBookInRoom><IsFreeRoom>false</IsFreeRoom><IsInnerRoom>true</IsInnerRoom><IsThirdOTA>false</IsThirdOTA><IsAssociationRoom>false</IsAssociationRoom><RoomRemark /><FolioInnerRemark /><FolioRemark /><AddtionalFlag><int>1</int></AddtionalFlag><IsReserve>false</IsReserve><ClearRoomType>3</ClearRoomType><ClearRoomTypeName>normal</ClearRoomTypeName><CheckOutID>0</CheckOutID><CheckOutState>None</CheckOutState><MilkMarketStatus>0</MilkMarketStatus></RoomStatusGraphItem></GetCurrentRoomStatusGraphResult></GetCurrentRoomStatusGraphResponse></soap:Body></soap:Envelope>';
function parseXml(xml) {
return new Promise((resolve, reject) => {
parseString(xml, (err, result) => {
if (err) {
reject(err);
} else {
resolve(result);
}
});
});
}
function processResult(result) {
console.log("processResult: result: ", result);
}
async function testXmlParse(xml) {
try {
let result = await parseXml(xml);
// Now that you have the result you can do further processing, write to file etc.
processResult(result);
} catch (err) {
console.error("parseXml failed: ", err);
}
}
testXmlParse(xmlInput);
请参阅安装说明here