问题
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