WebView – WebPage not available

I (like many others) followed the webview tutorial, but I can’t get pages to load. Everything comes up as ‘Webpage not Available’

I have ensured that the emulator does have internet access, and just to rule out a problem with the emulator I tried installing it on my phone, which resulted in the same behavior.

  • How to decide when to run different android applications components in a separate process
  • How to list remote files from Android via Bluetooth?
  • Touch two views at once on android
  • Android MediaPlayer error (1, -2147483648)
  • How can I alias an android bitmap to a drawable from another size (drawable-large-mdpi aliases to drawable-hdpi)
  • Android Google Maps fragment in the xml. I get “Unexpected namespace prefix”
  • I have read that the biggest issue is people not putting the INTERNET permission in my manifest file, which I have tried putting as a child of different elements in the manifest to no avail. Does anyone know why I can’t get this to load?

    Here is my code:


    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".AndroidTestActivity"
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            <uses-permission android:name="android.permission.INTERNET" />


    public class AndroidTestActivity extends Activity {
        WebView webview;
            /** Called when the activity is first created. */
            public void onCreate(Bundle savedInstanceState) {
                webview = (WebView) findViewById(R.id.webview);
                Intent intent = getIntent();
                // To get the action of the intent use
                // We current open a hard-coded URL
                try {
                    webview.setWebViewClient(new AndroidTestClient());
                } catch (Exception e) {
            public boolean onKeyDown(int keyCode, KeyEvent event) {
                if ((keyCode == KeyEvent.KEYCODE_BACK) && webview.canGoBack()) {
                    return true;
                return super.onKeyDown(keyCode, event);
            private class AndroidTestClient extends WebViewClient {
                public boolean shouldOverrideUrlLoading(WebView view, String url) {
                    return true;


    Related posts:

    How to get thumbnail for video in my /sdcard/Android/data/mypackage/files folder?
    Android Media Stream Error? java.io.FileNotFoundException: No content provider :http://
    ListView like in universal image loader sample app
    SharedPreferences not being updated
    Run multiple android app instances like parallel space
    findViewById returns null on a LinearLayout inside an &lt;include&gt;d view
  • How to create a settings activity for Android Live Wallpaper
  • Send HTTP GET request with header
  • Clearing user's Facebook session in Webview
  • ANDROID: How do I download a video file to SD card?
  • Push Notifications in Android Platform
  • How to launch a PopupWindow or Dialog from an input method service?
  • One Solution collect form web for “WebView – WebPage not available”

    Your internet permission should be an immediate child of “manifest” – shouldn’t be under “application”.


        android:versionCode="3210" android:versionName="1.1.0"> 
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-sdk android:minSdkVersion="6" android:targetSdkVersion="10"/>
        <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
        <!-- activities go here -->

    Hope this helps

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.