title: ERROR: Cannot find Package - Customizing Notifications with RemoteViews
body: <p>I'm using phonegap push plugin on cordova. </p>
  
  <p>When i try to build my app, it shows the following errors: </p>
  
  <pre><code>Error: /Users/Lawrence/solvePOS/platforms/android/gradlew: Command failed with exit code 1 Error output:
  /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:324: error: cannot find symbol
          RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.custom_notification);
          ^
    symbol:   class RemoteViews
    location: class GCMIntentService
  /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:324: error: cannot find symbol
          RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.custom_notification);
                                        ^
    symbol:   class RemoteViews
    location: class GCMIntentService
  /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:324: error: package R does not exist
          RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.custom_notification);
                                                                       ^
  /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:325: error: package R does not exist
          contentView.setImageViewResource(R.id.notification_image, R.drawable.notification_image);
                                            ^
  /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:325: error: package R does not exist
          contentView.setImageViewResource(R.id.notification_image, R.drawable.notification_image);
                                                                     ^
  /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:326: error: package R does not exist
          contentView.setTextViewText(R.id.notification_title, fromHtml(extras.getString(TITLE)));
                                       ^
  /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:327: error: package R does not exist
          contentView.setTextViewText(R.id.notification_text, fromHtml(extras.getString(MESSAGE)));
                                       ^
  Note: /Users/Lawrence/solvePOS/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java uses or overrides a deprecated API.
  Note: Recompile with -Xlint:deprecation for details.
  Note: Some input files use unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  7 errors
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':compileDebugJavaWithJavac'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  </code></pre>
  
  <p>I know the problem probably lies with the layout custom_notification.xml file in res/layout. However, when i last checked, it was there.</p>
  
  <p>custom_notification.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/custom_notification"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:gravity="center" &gt;
  
      &lt;ImageView
          android:id="@+id/notification_image"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
      /&gt;
  
      &lt;TextView 
          android:id="@+id/notification_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_toRightOf="@id/notification_image"
          android:layout_alignTop="@+id/notification_image"
          style="@style/NotificationTitle"
      /&gt;
  
      &lt;TextView
          android:id="@+id/notification_text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_toRightOf="@+id/notification_image"
          android:layout_below="@+id/notification_title"
          style="@style/NotificationText"
      /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>styles.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;style name="NotificationText"&gt;
      &lt;/style&gt;
      &lt;style name="NotificationTitle"&gt;
      &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>I'm using the following code for createNotification:</p>
  
  <pre><code>    RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.custom_notification);
      contentView.setImageViewResource(R.id.notification_image, R.drawable.notification_image);
      contentView.setTextViewText(R.id.notification_title, fromHtml(extras.getString(TITLE)));
      contentView.setTextViewText(R.id.notification_text, fromHtml(extras.getString(MESSAGE)));
  
      NotificationCompat.Builder mBuilder =
              new NotificationCompat.Builder(context)
                      .setWhen(System.currentTimeMillis())
                      .setContent(contentView)
                      //.setContentTitle(fromHtml(extras.getString(TITLE)))
                      .setTicker(fromHtml(extras.getString(TITLE)))
                      .setContentIntent(contentIntent)
                      .setAutoCancel(true);
  </code></pre>
  
  <p>I also have view.View imported: </p>
  
  <pre><code>import android.widget.RemoteViews
  import android.view.View;
  </code></pre>
  
  <p>Any assistant will be greatly appreciated. Thanks. Got my resource from here: <a href="http://www.framentos.com/android-tutorial/2012/02/20/how-to-create-a-custom-notification-on-android/" rel="nofollow noreferrer">http://www.framentos.com/android-tutorial/2012/02/20/how-to-create-a-custom-notification-on-android/</a></p>