title: Widget causes "Application not installed" error
body: <p>I am trying to create my first Widget for the home screen. I have read the tutorial on the developer site, combed the web for tutorials, tipps and problem solutions but still can't seem to get it to work. </p>
  
  <p><strong>Problem:</strong></p>
  
  <p>I can run the App without any problems. I can also select the Widget for my App from the menu (long click on home screen --> Android-Widgets --> List of available Widgets). When I select my widget though, I get the following error message (as a toast):
  "Application is not installed on your phone."</p>
  
  <p>Here my <strong>source code</strong>:</p>
  
  <p>Entry in the manifest:</p>
  
  <pre><code>&lt;receiver android:name=".SubscriberStateWidgetProvider" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.appwidget.action.APPWIDGET_UPDATE" /&gt;
          &lt;/intent-filter&gt;
  
          &lt;meta-data
              android:name="android.appwidget.provider"
              android:resource="@xml/subscriber_status_widget" /&gt;
  &lt;/receiver&gt;
  </code></pre>
  
  <p>AppWidgetInfoProvider xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:minWidth="40dp"
    android:minHeight="40dp"
    android:updatePeriodMillis="300000"
    android:configure="de.xxx.SubscriberStateWidgetProvider"&gt;
  &lt;/appwidget-provider&gt;
  </code></pre>
  
  <p>Layout-File:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="@dimen/widget_margin"&gt;
   &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
        &lt;ImageView
            android:id="@+id/subscriberStateWidgetImage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/acc_app_logo"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:layout_margin="5dp" /&gt;
        &lt;TextView 
            android:id="@+id/subscriberStateWidgetTextViewLable"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/subscriberStatusText"
            android:layout_toRightOf="@+id/subscriberStateWidgetImage"
            android:layout_alignTop="@+id/subscriberStateWidgetImage"
            android:layout_marginLeft="5dp"/&gt;
  
         &lt;TextView 
            android:id="@+id/subscriberStateWidgetTextViewInfo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/subscriberStateWidgetImage"
            android:layout_below="@+id/subscriberStateWidgetTextViewLable"
            android:layout_alignBottom="@+id/subscriberStateWidgetImage"
            android:layout_marginLeft="5dp"
            android:text="@string/subscriberStatusUnknown"/&gt;
  
    &lt;/RelativeLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>AppWidgetProvider-Klass:</p>
  
  <pre><code>public class SubscriberStateWidgetProvider extends AppWidgetProvider{
  
  public String SUBSCRIBER_WIDGET_UPDATE = "subscriberWidgetUpdate";
  
  
  @Override
  public void onUpdate(Context context, AppWidgetManager appWidgetManager,
          int[] appWidgetIds) {
      // TODO Auto-generated method stub
      super.onUpdate(context, appWidgetManager, appWidgetIds);
  
      final int N = appWidgetIds.length;
  
      // Perform this loop procedure for each App Widget that belongs to this provider
      for (int i=0; i&lt;N; i++) {
          int appWidgetId = appWidgetIds[i];
      }
  }
  }
  </code></pre>
  
  <p>Possible causes that I have excluded:</p>
  
  <ul>
  <li>Double declaration of the launch Activity in the manifest</li>
  <li>Systax error in widget provider</li>
  <li>Double permissen declaraion in the manifest</li>
  <li>Double Widget declaration in the manifest</li>
  <li>The app is defenetly installed. I can select it from the application menu and it works perfectly.</li>
  </ul>
  
  <p>I have also tried creating the widget when the app is running (started app, pushed button to go to home screen) and when app is not running (started app, used back button to stop the app) and get the same behaviour both times.</p>
  
  <p>There are no error or warning entries in the LogCat or my Log file.</p>
  
  <p>I would really appriciate any ideas, solutions or help you might have.
  Thanks in advance!</p>