我使用sencha构建命令(sencha app create)生成了一个简单的sencha touch应用程序。之后我在我的应用程序中包含了cordova 2.3.0。我的index.html文件如下:
<!DOCTYPE HTML>
<html manifest="" lang="en-US">
<head>
<meta charset="UTF-8">
<title>SimpleApp</title>
<style type="text/css">
/**
* Example of an initial loading indicator.
* It is recommended to keep this as minimal as possible to provide instant feedback
* while other resources are still being loaded for the first time
*/
html, body {
height: 100%;
background-color: #1985D0
}
#appLoadingIndicator {
position: absolute;
top: 50%;
margin-top: -15px;
text-align: center;
width: 100%;
height: 30px;
-webkit-animation-name: appLoadingIndicator;
-webkit-animation-duration: 0.5s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: linear;
}
#appLoadingIndicator > * {
background-color: #FFFFFF;
display: inline-block;
height: 30px;
-webkit-border-radius: 15px;
margin: 0 5px;
width: 30px;
opacity: 0.8;
}
@-webkit-keyframes appLoadingIndicator{
0% {
opacity: 0.8
}
50% {
opacity: 0
}
100% {
opacity: 0.8
}
}
</style>
<script type="text/javascript" charset="utf-8" src="cordova-2.3.0.js"></script>
<script type="text/javascript" charset="utf-8">
function load() {
document.addEventListener('deviceready', onDeviceReady, false);
};
function onDeviceReady() {
alert('Phonegap is Ready Now');
}
</script>
<!-- The line below must be kept intact for Sencha Command to build your application -->
<script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>
</head>
<body onload="load();">
<div id="appLoadingIndicator">
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
但每当我在Android模拟器中加载此应用程序时,应用程序就会卡在默认的初始屏幕上。它没有删除。即使在5分钟后,我只能看到应用程序加载指示器。
我正在使用eclipse来生成apk。我已将cordova-2.3.0.jar放在libs文件夹中。我正在测试android 4.0。
我该如何解决这个问题?
答案 0 :(得分:0)
请参阅此链接。可能它会帮助你如何创建phonegap和sencha touch 2 App for android。 http://andidog.de/blog/2012/06/packaging-a-sencha-touch-2-application-with-phonegap-for-android/