Javascript 如何设置Cordova配置?
当我使用Cordova构建应用程序时,例如,对于浏览器:“Cordova run browser”,我会得到一个空白页面“Not found”,地址栏中的路径如下所示: localhost:8000/index.html 但是如果我从地址栏index.html中删除,地址栏是一个Javascript 如何设置Cordova配置?,javascript,cordova,url-routing,Javascript,Cordova,Url Routing,当我使用Cordova构建应用程序时,例如,对于浏览器:“Cordova run browser”,我会得到一个空白页面“Not found”,地址栏中的路径如下所示: localhost:8000/index.html 但是如果我从地址栏index.html中删除,地址栏是一个 localhost:8000/一切都很完美。 我试图在配置cordova中更改src属性的字符串-我写空字符串。从一开始,一切都很顺利。 但是当我运行cordova针对Android的构建时——这个案例不再有效,我得到
localhost:8000/
一切都很完美。我试图在配置cordova中更改src属性的字符串-我写空字符串。从一开始,一切都很顺利。 但是当我运行cordova针对Android的构建时——这个案例不再有效,我得到错误“
页面未找到”
”。对于那个案例,这个问题的解决方法是什么
我已经有了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>
反应离子反应离子
但是我希望我的应用程序在我的手机上运行,地址栏是:
localhost:8000
/不带index.html
config.xml中的
中是否有src值?是的:但是如果我写-我会得到错误:“找不到页面”,这会告诉cordova你的起始页面是什么。将其保留为index.html并创建一个index.html。这就是它希望你做的。我已经有index.html了