错误:(29,6)错误:元素类型"输入"必须由匹配的结束标记终止""

时间:2015-06-07 16:06:00

标签: android html webview android-webview

我正在android studio中开发一个网络应用程序,我有我的webview和一切正确设置。这个应用程序调试正常,直到最近的工作室更新。

我似乎在调试时遇到这个错误:

Error:(29, 6) Execution failed for task ':app:mergeDebugResources'.
  

C:\ Users \ khand_000 \ Desktop \ Android Projects \ QuadraticEquationSolver \ app \ src \ main \ res \ assets \ index.html:29:6:错误:元素类型"输入"必须由匹配的结束标记终止""。

这是我的index.html:

<!doctype html>
<html>
<head>
    <meta charset="UTF-8"/>
    <style>
        input, select {
        width: 50px;
        margin: 5px 5px 5px 0px;
        border: 1px solid #000;
        height: 30px;
        text-align: center;
        }
        button {
        width: 200px;
        background-color: #006699;
        border: none;
        color: #fff;
        border: 1px solid #000;
        height: 30px;
        }
        #form{
        text-align: center;
        }
    </style>
</head>
<body>
Enter your Quadratic Equation in the form: <br />     <b>ax<sup>2</sup>+bx+c=0</b><br />
You may use negative values for a, b and c
<p id="form">
    <select id="sign-a">
        <option value="+">+</option>
        <option value="-">-</option>
    </select>
    <input type="number" id="a" placeholder="a">x<sup>2</sup>
    <select id="sign-b">
        <option value="+">+</option>
        <option value="-">-</option>
    </select>
    <input type="number" placeholder="b" id="b">x
    <select id="sign-c">
        <option value="+">+</option>
        <option value="-">-</option>
    </select>
    <input type="number" id="c" placeholder="c"> = 0<br />
    <button id="submit">Solve!</button>
</p>
<p id="answer"></p>
<script src="jquery.js"></script>
<script>
        $(function(){
            $("#submit").click(function(){
                $("#answer").empty();
                var a = $("#a").val();
                var b = $("#b").val();
                var c = $("#c").val();

                if($.isNumeric(a) && $.isNumeric(b) && $.isNumeric(c)){

                    var signa = $("#sign-a").val();
                    var signb = $("#sign-b").val();
                    var signc = $("#sign-c").val();

                    if(signa == "-"){
                        a = a * -1;
                    }
                    if(signb == "-"){
                        b = b * -1;
                    }
                    if(signc == "-"){
                        c = c * -1;
                    }


                if(a != 0){
                a = parseFloat(a);
                b = parseFloat(b);
                c = parseFloat(c);

                $("#answer").append("D = b<sup>2</sup> - 4ac <br />");
                $("#answer").append("D = " + b + "<sup>2</sup> - (4 * " + a + " * " + c + ") <br />");

                var b2 = b * b;
                var acx4 = 4 * a * c;
                var d = b2 - acx4;

                if(d >= 0){

                    $("#answer").append("D = " + d + "<br />");
                    $("#answer").append("x = (-b &plusmn; &radic;D)/2a <br />");
                    $("#answer").append("x = (" + b*-1 + "&plusmn; &radic;" + d + ")/" + a*2 + "<br />");

                    var rootd = Math.sqrt(d);
                    var alpha = (-b + rootd)/(2*a);
                    var beta = (-b - rootd)/(2*a);

                    $("#answer").append("<p>");
                    $("#answer").append("x<sub>1</sub> = (-b + &radic;D)/2a <br />");
                    $("#answer").append("x<sub>1</sub> = ("+ b*-1 +" + &radic;" + d + ")/2*" + a +"<br />");
                    $("#answer").append("x<sub>1</sub> = " + Math.round(alpha*1000)/1000);
                    $("#answer").append("</p>");
                    $("#answer").append("<p>");
                    $("#answer").append("x<sub>2</sub> = (-b - &radic;D)/2a <br />");
                    $("#answer").append("x<sub>2</sub> = ("+ b*-1 +" - &radic;" + d + ")/2*" + a +"<br />");
                    $("#answer").append("x<sub>2</sub> = " + Math.round(beta*1000)/1000);
                    $("#answer").append("</p>");
                    $("#answer").append("The roots are: " + alpha + " and " + beta);

                }else{
                    $("#answer").text("This equation has no real roots.");
                }
                }else{
                     $("#answer").text("a can't be zero!");
                }
            }else{
                $("#answer").text("a, b and c must be integers!");
            }
            });
    });
</script>

而且,作为一个注释,我已经在插件中禁用了AndroidLint。

0 个答案:

没有答案