title: Pushnotification - Caused by: java.lang.ClassNotFoundException
body: <p>I have implemented phonegap pushplugin in my app from this link <a href="https://github.com/phonegap-build/PushPlugin" rel="nofollow">https://github.com/phonegap-build/PushPlugin</a>. I have followed all those which has been given for installation but i am getting this error Caused by: java.lang.ClassNotFoundException.</p>
  
  <p>Below is my Androidmanifestfile</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.jilmil.arbvantage"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk android:minSdkVersion="10" /&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;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.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
      &lt;uses-permission android:name="android.permission.GET_TASKS" /&gt;
      &lt;permission android:name="com.jilmil.arbvantage.permission.C2D_MESSAGE" android:protectionLevel="signature" /&gt;
      &lt;uses-permission android:name="com.jilmil.arbvantage.permission.C2D_MESSAGE" /&gt;
  
      &lt;application android:icon="@drawable/ic_launcher"
          android:label="@string/app_name" &gt;
  
          &lt;activity android:name="com.plugin.GCM.PushHandlerActivity"/&gt;
          &lt;receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" &gt;
            &lt;intent-filter&gt;
              &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
              &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
              &lt;category android:name="com.jilmil.arbvantage" /&gt;
            &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;service android:name="com.google.android.gcm.GCMIntentService" /&gt;
  
          &lt;activity android:configChanges="orientation|keyboardHidden"
              android:name=".MyPhoneGapActivity"
              android:label="@string/app_name" &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>Logcat error:</p>
  
  <pre><code>04-30 12:08:24.579: E/AndroidRuntime(23143): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.jilmil.arbvantage/com.jilmil.arbvantage.MyPhoneGapActivity}: java.lang.ClassNotFoundException: com.jilmil.arbvantage.MyPhoneGapActivity in loader dalvik.system.PathClassLoader[/data/app/com.jilmil.arbvantage-2.apk]
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.os.Handler.dispatchMessage(Handler.java:99)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.os.Looper.loop(Looper.java:130)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.app.ActivityThread.main(ActivityThread.java:3687)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at java.lang.reflect.Method.invokeNative(Native Method)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at java.lang.reflect.Method.invoke(Method.java:507)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at dalvik.system.NativeStart.main(Native Method)
  04-30 12:08:24.579: E/AndroidRuntime(23143): Caused by: java.lang.ClassNotFoundException: com.jilmil.arbvantage.MyPhoneGapActivity in loader dalvik.system.PathClassLoader[/data/app/com.jilmil.arbvantage-2.apk]
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
  04-30 12:08:24.579: E/AndroidRuntime(23143):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
  </code></pre>
  
  <p>MyPhoneGapActivity.java</p>
  
  <pre><code>package com.jilmil.arbvantage;
  
  import org.apache.cordova.DroidGap;
  import android.os.Bundle;
  
  public class MyPhoneGapActivity extends DroidGap {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          super.loadUrl("file:///android_asset/www/index.html");
      }
  }
  </code></pre>