title: PhoneGap class not found error in android
body: <p>I am facing some problem with my PhoneGap(Android) application. So far I understand, I have done everything well. Here is what I have done.</p>
  
  <ol>
  <li>After creating a project in Eclipse, I have added cordova-2.2.0.jar in my libs folder.</li>
  <li>Then I edited AndroidManifest.xml and MainActivity.java</li>
  <li>I created www folder inside assets folder and keep cordova-2.2.0.js and index.html</li>
  </ol>
  
  <p>So, far everything was OK. But when I run this program, it is showing an error. I have attached a screenshot and sample code. </p>
  
  <p><img src="https://i.stack.imgur.com/0Omk0.png" alt="enter image description here"></p>
  
  <p>AndroidManifest.xml</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.hellopgap"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="15" /&gt;
  
      &lt;supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:xlargeScreens="true"
          android:resizeable="true"
          android:anyDensity="true"
          /&gt;
  
      &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.RECEIVE_SMS" /&gt;
      &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
      &lt;uses-permission android:name="android.permission.RECORD_VIDEO"/&gt;
      &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
      &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_CONTACTS" /&gt;   
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;   
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="android.permission.BROADCAST_STICKY" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/title_activity_main" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>package com.example.hellopgap;
  
  import android.app.Activity;
  import android.os.Bundle;
  import org.apache.cordova.*;
  
  public class MainActivity extends DroidGap {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          super.loadUrl("file:///android_asset/www/index.html");
      }   
  }
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
          &lt;meta name="format-detection" content="telephone=no" /&gt;
          &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /&gt;
          &lt;script type="text/javascript" charset="utf-8" src="cordova-2.2.0.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" charset="utf-8"&gt;
  
              // Wait for Cordova to load
              //
              document.addEventListener("deviceready", onDeviceReady, false);
  
              // Cordova is ready
              //
              function onDeviceReady() {
                  // Empty
  
              }
  
              // alert dialog dismissed
              function alertDismissed() {
                  // do something
              }
  
              // Show a custom alertDismissed
              //
              function showAlert() {
                  navigator.notification.alert(
                      'You are the winner!',  // message
                      alertDismissed,         // callback
                      'Game Over',            // title
                      'Done'                  // buttonName
                  );
              }
  
      &lt;/script&gt;
  
          &lt;title&gt;Notification Example&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class="app"&gt;
              &lt;h1&gt;Apache Cordova&lt;/h1&gt;
              &lt;h3&gt;This is sample PhoneGap apps&lt;/h3&gt;
              &lt;p&gt;&lt;a href="#" onclick="showAlert(); return false;"&gt;Show Alert&lt;/a&gt;&lt;/p&gt;
          &lt;/div&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thanks, in advance.</p>