javascriptandroidwebviewandroid-webviewandroid-webview-javascript

Android Studio web view error: "Uncaught SyntaxError: Unexpected token )"


I have a web view application in Android Studio. The application works normally on the computer, namely chrome. But I get the following error in web view. What could be the problem? Thanks.

$.post( "https://xxxxxx",
          {
            car_id:carid
          },
      (Error)----->    ).done(function(data) {   
              if(data=='0')
              {

Android Studio Error:

I/chromium: [INFO:CONSOLE(318)] "Uncaught SyntaxError: Unexpected token )", source: xxxxx (318)

UPDATE:

I found the problem. It was giving an error because of the comma in the top line. But I still want to know the cause of the problem.


Solution

  • It seems you have some paranthesis problem. You probably forgot to close one.