R.id.webview error: cannot find symbol in MainActivity.java

Viewed 29

Good day,

I am doing a cordova mobile app, and I am trying to access to webview to configure something. I google around, the way to get the webview object is something as follow:

WebView webView = (WebView) this.findViewById(R.id.webview);

I put this code in my MainActivity.java, but I hit error when I trying to build my code: enter image description here

I google around and found that many post was asking to check in the layout file and the activity_main file, but I do not have any of these file in my workspace. I am new to frontend development so maybe I may have some miss understand on some solution from internet.

Can anyone advise me on this?

0 Answers
Related