1. Check out our companion app, Forums for Android! Download from Google Play

WebView Loadurl Issue plz help

Discussion in 'Application Development' started by kumaresh17, Aug 20, 2010.

  1. kumaresh17

    kumaresh17 New Member
    Thread Starter
    5

    Aug 20, 2010
    3
    0
    5
    Hi,
    My webView Doesnot load the URL
    foolowing code snipist

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

    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.loadUrl(
    http://developer.android.com/index.html
    );


    I have given this tag
    <uses-permissionandroid:name="android.permission.INTERNET"></uses-permission>
    in the manifest also.
    Andriod default native brower can open the above url but through my application using WebView It gives the Page is not available, i tried with "http://www.google.com" url also but the same error,
    NOTE:- I am getting error in simulator , In Andriod device it is running fine


    Please help where i am doing wrong

     

    Advertisement

  2. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    459
    163
    Male
    You probably do not have network enabled on your emulator.

    When you create a new AVD, you have to add GSM Modem to your list of available hardware.
     
  3. kumaresh17

    kumaresh17 New Member
    Thread Starter
    5

    Aug 20, 2010
    3
    0
    5

    Hi
    I have created a new AVD and added GSM Modem, but still webView gives "Web Page is not found"
    I have done Proxy setting by creating new APNs
    but it doesnot solved the problem.

    Nut Shell:-
    a) NATIVE browser display the web page with any valid URL
    b) In device webview loadUrl works fine
    c) but in simulator webview LoadUrl gives "Web Page is not found"

    please help me how to resolve it
     

Share This Page

Loading...