1. Download our Official Android App: Forums for Android!

Apps WebView Loadurl Issue plz help

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

  1. kumaresh17

    kumaresh17 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Aug 20, 2010

    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 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    1,930
    Joined:
    Jul 13, 2010

    Jul 13, 2010
    1,930
    457
    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 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Aug 20, 2010

    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...