canr run simple android "Web Apps in WebView"
<p>This is my first android app and I'm a little disapponted because I'm not even able to run the google sample!!</p>

<p>Google sample: <a href="http://developer.android.com/guide/webapps/webview.html" rel="nofollow">http://developer.android.com/guide/webapps/webview.html</a></p>

<p>Android version 2.1 (as suggested)</p>

<p>This is the log when I'm trying to run the app:</p>

<pre><code>[2012-02-06 18:30:18 - XXX] ------------------------------
[2012-02-06 18:30:18 - XXX] Android Launch!
[2012-02-06 18:30:18 - XXX] adb is running normally.
[2012-02-06 18:30:18 - XXX] Performing YYY.Android.Android.XXXActivity activity launch
[2012-02-06 18:30:18 - XXX] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'test21'
[2012-02-06 18:30:18 - XXX] Uploading XXX.apk onto device 'emulator-5554'
[2012-02-06 18:30:18 - XXX] Installing XXX.apk...
[2012-02-06 18:30:21 - XXX] Success!
[2012-02-06 18:30:21 - XXX] Starting activity YYY.Android.Android.XXXActivity on device emulator-5554
[2012-02-06 18:30:23 - XXX] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=YYY.Android/.Android.XXXActivity }
[2012-02-06 18:30:23 - XXX] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=YYY.Android/.Android.XXXActivity } from null (pid=-1, uid=-1) requires android.permission.INTERNET
</code></pre>

<p>But I've already gave the internet permission!</p>

<p>these are my files:</p>

<p><strong>.java</strong></p>

<pre><code>package XXX.Android;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.*;;

public class XXXActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    setContentView(R.layout.main); 

    // Configuration of the WebView
    final WebView webview = (WebView) findViewById(R.id.webview);
    final WebSettings settings = webview.getSettings();

    settings.setJavaScriptEnabled(true);

    webview.loadUrl("http://www.google.com");     

    }
}
</code></pre>

<p><strong>Main.xml</strong></p>

<pre><code>&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;

&amp;lt;WebView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
/&amp;gt;
</code></pre>

<p><strong>Manifest.xml</strong></p>

<pre><code>&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionCode="1"
    android:versionName="1.0" package="XXX.Android"&amp;gt;

    &amp;lt;uses-permission android:name="android.permission.INTERNET" /&amp;gt;

    &amp;lt;uses-sdk android:minSdkVersion="7" /&amp;gt;

    &amp;lt;application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" 
        android:permission="android.permission.INTERNET"&amp;gt;
        &amp;lt;activity
            android:name=".Android.XXXActivity"
            android:label="@string/app_name" &amp;gt;
            &amp;lt;intent-filter&amp;gt;
                &amp;lt;action android:name="android.intent.action.MAIN" /&amp;gt;
                &amp;lt;category android:name="android.intent.category.LAUNCHER" /&amp;gt;
            &amp;lt;/intent-filter&amp;gt;
        &amp;lt;/activity&amp;gt;
    &amp;lt;/application&amp;gt;

&amp;lt;/manifest&amp;gt;
</code></pre>
