解決關於 ionic3 啟動白屏 控制台錯誤提示:Uncaught SyntaxError Use of const in strict mode.,ionic3uncaught

來源:互聯網
上載者:User

解決關於 ionic3 啟動白屏 控制台錯誤提示:Uncaught SyntaxError Use of const in strict mode.,ionic3uncaught

今天將項目從ionic2 升級為ionic3 ,ionic serve 運行在網頁上無任何錯誤。

但是將項目打包成為android apk 卻一直卡在啟動頁面 白屏,進不去的情況。後來在android studio 控制台看到這個錯誤提示:Uncaught SyntaxError Use of const in strict mode.有些莫名其妙的bug導致apk 打包後不能正常運行在機器上。

後經尋找,找到這個解決方案。

1.先給項目添加 這個外掛程式 

cordova plugin add cordova-plugin-crosswalk-webview

2.清理一下項目

cordova clean 

3.添加安卓平台的支援

cordova platform add android

4.成功打包產生並運行在android的機器上。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.