Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

Why doesn't “System.out.println” work in Android?

Asked by Aishwarya Jhadav Jun 21, 2021 1.2K views 1 answer
Share

About this question

 I want to print something in console, so that I can debug it. But for some reason, nothing prints in my Android application.

How do I debug then?

public class HelloWebview extends Activity {

    WebView webview;    

    private static final String LOG_TAG = "WebViewDemo";

    private class HelloWebViewClient extends WebViewClient {

        @Override

        public boolean shouldOverrideUrlLoading(WebView view, String url) {

            view.loadUrl(url);

            return true;

        }

    }

    /** Called when the activity is first created. */

    @Override

    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);

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

        webview.setWebViewClient(new HelloWebViewClient());

        webview.getSettings().setJavaScriptEnabled(true);

        webview.setWebChromeClient(new MyWebChromeClient());

        webview.loadUrl("http://example.com/");    

        System.out.println("I am here");

    }

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.