当前位置:编程学习 > wap >>

Can't bind to local 8632 for debugger

在用eclipse写phonegap+jquery的小程序时,当我运行在android手机上运行,点击button时,在控制台中出现了Can't bind to local 8632 for debugger这个问题。导致button点击后没有反应。

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>html app</title>
        <script type="text/javascript" charset="utf-8" src="../js/cordova-2.7.0.js">
        </script>
        <!--<link rel="stylesheet"
        href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
        <script type="text/javascript"
        src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script type="text/javascript"
        src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
        -->
        <link rel="stylesheet" href="../css/jquery.mobile-1.3.1.min.css" />
        <script type="text/javascript" src="../js/jquery.js">
        </script>
        <script type="text/javascript" src="../js/cordova-2.7.0.js">
        </script>
        <script type="text/javascript" src="../js/jquery.mobile-1.3.1.min.js">
        </script>
        <script type="text/javascript">
            $('#PageOne').live('pageinit', function(event){
             alert("live");
                var showTip = function(){
                    navigator.notification.alert("this is a message from page one!", null, "Message", "Close");
                    $(this).die("click");
                };
                
                var confirm = function(){
                    navigator.notification.confirm('You are the winner!', // message  
             null, // callback to invoke with index of button pressed  
             'Game Over', // title  
             'Restart,Exit' // buttonLabels  
            );
                    $(this).die("click");
                };
                
                var redirectPage = function(){
                    $.mobile.changePage("#PageTwo");
                    $(this).die("click");
                };
                
                $(event.target).find('#alert').live('click', showTip);
                $(event.target).find('#confirm').live('click', confirm);
                $(event.target).find('#changePage').live('click', redirectPage);
            });
            
            $('#PageTwo').live('pageshow', function(event){
                var showTip = function(){
                    navigator.notification.alert("this is a message from page two!", null, "Message", "Close");
                    $(this).die("click");
                };
                
                var confirm = function(){
                    navigator.notification.confirm('You are the losser!', // message  
             null, // callback to invoke with index of button pressed  
             'Game Over', // title  
             'Restart,Exit' // buttonLabels  
            );
                    $(this).die("click");
                };
                $(event.target).find('#alert').live('click', showTip);
                $(event.target).find('#confirm').live('click', confirm);
            });
        </script>
    </head>
    <body>
        <div id="PageOne" data-role="page">
            <div data-role="header" data-backbtn="false">
                <h1>Phone Gap One</h1>
            </div>
            <div data-role="content">
                <div>
                    <a href="#" id="alert" data-role="button" data-theme="b">Alert</a>
                </div>
                <div>
                    <a href="#" id="confirm" data-role="button" data-theme="b">confirm</a>
                </div>
                <div>
                    <a href="#" id="changePage" data-role="button" data-theme="b">changePage</a>
                </div>
            </div>
            <div data-role="footer">
                <div data-role="navbar">
                    <ul>
                        <li>
                            <a href="#PageOne">Page One</a>
                        </li>
                        <li>
                            <a href="#PageTwo">PageTwo</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div id="PageTwo" data-role="page">
            <div data-role="header" data-backbtn="true">
                <h1>Phone Gap Two</h1>
                <a data-role="button" data-rel="back">Previous</a>
            </div>
            <div data-role="content">
                <div>
                    <a href="#" id="alert" data-role="button" data-theme="b">Alert</a>
                </div>
                <div>
                    <a href="#" id="confirm" data-role="button" data-theme="b">Confirm</a>
                </div>
                <div>
                    <a href="#" data-role="button" data-theme="b">Page Three</a>
                </div>
            </div>
            <div data-role="footer">
                <div data-role="navbar">
                    <ul>
                        <li>
                            <a href="#PageOne">Page One</a>
                        </li>
                        <li>
                            <a href="#PageTwo">Page Two</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </body>
</html>
这是我的代码。
 求大神指导。。。 Android phonegap jquery
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,