how to set the Cordova configuration?

假装没事ソ 提交于 2019-12-25 06:46:32

问题


When I build applications by Cordova, for example for browser: "cordova run browser" I get a blank page "Not found", and the path in the address bar as follows:

localhost:8000/index.html

But if I remove from the address bar index.html and address bar is a localhost:8000/ everything works perfect.
I tried in the config cordova to change the string for the src attribute - i write null string. Then everything from the start worked perfectly. But when I run the build for Android by cordova -this case no longer works and I get the error "Page not found". What is the solve of this problem for that case?

I already have index.html:

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1,     maximum-scale=1, user-scalable=no"/>
  <meta name="description" content="Use Ionic with React"/>
  <title>Reactionic React Ionic</title></head>
  <link rel="stylesheet" type="text/css" href="style/index.css">
  <link rel="stylesheet" type="text/css" href="style/fonts.css">
<body>
  <div id="app"></div>
  <script src="index.js"></script>
</body>

But I want my app run on my phone with the address bar: localhost:8000/ without index.html

来源:https://stackoverflow.com/questions/42695913/how-to-set-the-cordova-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!