Error:(29, 6) Error: The element type "input" must be terminated by the matching end-tag "</input>"

1.3k views Asked by At

I am developing a web app in android studio and I have my webview and everything properly setup. This app was debugging fine until the recent studio update.

I seem to keep getting this error on debugging:

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: Error: The element type "input" must be terminated by the matching end-tag "".

Here is my 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>

And, just as a note, I have disabled AndroidLint in the plugins.

0

There are 0 answers