我正在嘗試在我的 Cordova android 應用程式中使用 a-frame,但是當我嘗試訪問其他本地檔案或 https 網站時,我收到一條錯誤訊息,告訴我我無法從 file:// 作業:
HTML file is currently being served via the file:// protocol. Assets, textures, and models WILL NOT WORK due to cross-origin policy! Please use a local or hosted server
我的問題是:如何在我的 Cordova 應用程式中使用本地服務器?還是有其他選擇?
uj5u.com熱心網友回復:
為您的應用設定主機名
<preference name="hostname" value="com.myapp" />
因此,您的內容已提供完畢,然后https://com.myapp您將https不再加載file://
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/520835.html
