ionic4中提示 cordova_not_available

发布于 5 年前 作者 phonegap100 7381 次浏览 来自 分享

cordova_not_available Native: tried calling Camera.getPicture, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator

其实这个错误主要就是cordova.js没有引入。虽然已经运行ionic build --prod以及cordova prepare了。但是可能因为修改了 index.html所以导致ionic build 以及cordova prepare的时候没法把cordova.js引入到编译目录的index.html里面

解决方案: http://www.ionic.wang/article-index-id-178.html

回到顶部