title: Android Manifest Problems
body: <p>Whenever I run my program, I get this error:</p>
  
  <pre><code>10-11 17:53:12.135: ERROR/AndroidRuntime(403):     at android.app.Instrumentation.newApplication(Instrumentation.java:957)
  10-11 17:53:12.135: ERROR/AndroidRuntime(403):     at android.app.Instrumentation.newApplication(Instrumentation.java:942)
  10-11 17:53:12.135: ERROR/AndroidRuntime(403):     at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:644)
  10-11 17:53:12.135: ERROR/AndroidRuntime(403):     ... 11 more
  10-11 17:53:53.525: ERROR/AndroidRuntime(434): FATAL EXCEPTION: main
  10-11 17:53:53.525: ERROR/AndroidRuntime(434): java.lang.RuntimeException: Unable to instantiate application eggplant.passerator.Passerator: java.lang.ClassCastException: eggplant.passerator.Passerator
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:649)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4232)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.ActivityThread.access$3000(ActivityThread.java:125)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.os.Handler.dispatchMessage(Handler.java:99)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.os.Looper.loop(Looper.java:123)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.ActivityThread.main(ActivityThread.java:4627)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at java.lang.reflect.Method.invokeNative(Native Method)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at java.lang.reflect.Method.invoke(Method.java:521)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at dalvik.system.NativeStart.main(Native Method)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434): Caused by: java.lang.ClassCastException: eggplant.passerator.Passerator
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.Instrumentation.newApplication(Instrumentation.java:957)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.Instrumentation.newApplication(Instrumentation.java:942)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:644)
  10-11 17:53:53.525: ERROR/AndroidRuntime(434):     ... 11 more
  </code></pre>
  
  <p>. I have no Idea why!!!! This didn't happen before</p>
  
  <pre><code>!&lt;manifest 
      xmlns:android="http://schemas.android.com/apk/res/android"
                package="eggplant.passerator"
                android:versionCode="1"
                android:versionName="1.0"&gt;
              &lt;application android:icon="@drawable/icon" android:label="@string/app_name" android:name="Passerator"&gt;
                  &lt;activity android:name=".Passerator" 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;
  
  
  
  
  
  
  
      package eggplant.passerator;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.CheckBox;
  import android.widget.EditText;
  import java.util.Random;
  
  public class Passerator extends Activity {
      /** Called when the activity is first created. */
      private String[] all_letters = {"a", "b", "c", "d", "e", "f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
      private String[] all_words = {"app","apple", "android", "beta","brown", "cow","camp", "down","dug", "elephant","eclair", "fail","full", "gone","got","how","honey","ill","ice","jog","journey","king","kangaroo", "lemon","lobster","mark","make","nose","none", "origin","octpus", "power","pick", "quadrant","respect","run","sun","seen","tons","tan", "under","unable","view","venus", "what","where","yes","yawn","zebra"};
      @SuppressWarnings("unused")
      private Button generateButton;
      private EditText minimum;
      private EditText maximum;
      private CheckBox letters;
      private CheckBox words;
      private CheckBox numbers;
      private EditText password;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          this.generateButton = (Button)this.findViewById(R.id.generate);
          this.minimum = (EditText)this.findViewById(R.id.min);
          this.maximum = (EditText)this.findViewById(R.id.max);
          this.letters = (CheckBox)this.findViewById(R.id.letters);
          this.words = (CheckBox)this.findViewById(R.id.words);
          this.numbers = (CheckBox)this.findViewById(R.id.numbers);
          this.password = (EditText)this.findViewById(R.id.password);
      }
      public void generate(View v)
      {
          String mi = minimum.getText().toString();
          String ma = maximum.getText().toString();
          Boolean num = numbers.isChecked();
          Boolean let = letters.isChecked();
          Boolean word = words.isChecked();
          String new_password = make_password(mi, ma, num, let, word);
          password.setText(new_password);
      }
      @SuppressWarnings("finally")
      public String make_password(String max, String min, Boolean numbers, Boolean letters, Boolean words)
      {
          String password = new String("");
          int minimum=0;
          int maximum=0;
          try
          {
              minimum = Integer.parseInt(min);
              maximum = Integer.parseInt(max);
          }
          catch(Throwable t)
          {
              password = "You must set both the minimum and maximum to an integer!";
          }
          finally
          {
              //if(numbers==true)password+="numbers,";
              //if(letters==true)password+="letters,";
              //if(words==true)password+="words.";
  
              Random random_gen = new Random();
              int length = minimum + (int) (Math.random()*(maximum - minimum));
              //password+=Integer.toString(length);
              //password+=":";
  
              if(numbers==false&amp;&amp;letters==true&amp;&amp;words==false)
              {
                  while(length!=0)
                  {
                      password+=all_letters[random_gen.nextInt(26)];
                      length-=1;
                  }
              }
              if(numbers==false&amp;&amp;letters==false&amp;&amp;words==true)
              {
                  if (length&lt;3)password="To use words only, you must set minimum to at least 3!";
                  while(length&gt;3)
                  {
                      String chosen_word=all_words[random_gen.nextInt(all_words.length)];
                      if (chosen_word.length()&lt;=length)
                      {
                      password+=chosen_word;
                      length-=chosen_word.length();
                      }
                  }
              }
              if(numbers==true&amp;&amp;letters==false&amp;&amp;words==false)
              {
                  while(length!=0)
                  {
                      password+=Integer.toString(random_gen.nextInt(9));
                      length-=1;
                  }
              }
              if(numbers==true&amp;&amp;letters==true&amp;&amp;words==false)
              {
                  while(length!=0)
                  {
                      if(random_gen.nextBoolean()==true)password+=all_letters[random_gen.nextInt(26)];
                      else password+=Integer.toString(random_gen.nextInt(9));
                      length-=1;
                  }
              }
              if(numbers==true&amp;&amp;letters==false&amp;&amp;words==true)
              {
                  while(length!=0)
                  {
                      if(random_gen.nextBoolean()==true)
                      {
                          password+=Integer.toString(random_gen.nextInt(9));
                          length-=1;
                      }
                      else
                      {
                          if(length&gt;3)
                          {
                              String chosen_word=all_words[random_gen.nextInt(all_words.length)];
                              if (chosen_word.length()&lt;=length)
                              {
                                  password+=chosen_word;
                                  length-=chosen_word.length();
                              }
                          }
                      }
                  }
              }
              if(numbers==false&amp;&amp;letters==true&amp;&amp;words==true)
              {
                  while(length!=0)
                  {
                      if(random_gen.nextBoolean()==true)
                      {
                          password+=all_letters[random_gen.nextInt(26)];
                          length-=1;
                      }
                      else
                      {
                          if(length&gt;3)
                          {
                              String chosen_word=all_words[random_gen.nextInt(all_words.length)];
                              if (chosen_word.length()&lt;=length)
                              {
                                  password+=chosen_word;
                                  length-=chosen_word.length();
                              }
                          }
                      }   
                  }
              }
              if(numbers==true&amp;&amp;letters==true&amp;&amp;words==true)
              {
                  while(length!=0)
                  {
                      int choice=random_gen.nextInt(3);
                      if(choice==0)
                      {
                          password+=all_letters[random_gen.nextInt(26)];
                          length-=1;
                      }
                      if (choice==1)
                      {
                          if(length&gt;3)
                          {
                              String chosen_word=all_words[random_gen.nextInt(all_words.length)];
                              if (chosen_word.length()&lt;=length)
                              {
                                  password+=chosen_word;
                                  length-=chosen_word.length();
                              }
                          }
                      }
                      if (choice==2)
                      {
                          password+=Integer.toString(random_gen.nextInt(9));
                          length-=1;
                      }
  
                  }
              }
              if(numbers==false&amp;&amp;letters==false&amp;&amp;words==false)password="You must check at least one of the check boxes above!";
              if (minimum&lt;maximum)password="The maximum must be less than the minimum!";
              return password;
          }
      }
  }
  
  
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;AbsoluteLayout
  android:id="@+id/widget35"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  &gt;
  &lt;Button
  android:id="@+id/generate"
  android:layout_width="320px"
  android:layout_height="53px"
  android:text="Generate"
  android:layout_x="0px"
  android:layout_y="272px"
  
  &gt;
  &lt;/Button&gt;
  &lt;EditText
  android:id="@+id/password"
  android:layout_width="320px"
  android:layout_height="110px"
  android:textSize="18sp"
  android:layout_x="0px"
  android:layout_y="322px"
  &gt;
  &lt;/EditText&gt;
  &lt;CheckBox
  android:id="@+id/numbers"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="Numbers"
  android:layout_x="200px"
  android:layout_y="202px"
  &gt;
  &lt;/CheckBox&gt;
  &lt;CheckBox
  android:id="@+id/words"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="Words"
  android:layout_x="110px"
  android:layout_y="202px"
  &gt;
  &lt;/CheckBox&gt;
  &lt;CheckBox
  android:id="@+id/letters"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="Letters"
  android:layout_x="20px"
  android:layout_y="202px"
  &gt;
  &lt;/CheckBox&gt;
  &lt;EditText
  android:id="@+id/max"
  android:layout_width="70px"
  android:layout_height="wrap_content"
  android:textSize="18sp"
  android:layout_x="10px"
  android:layout_y="122px"
  android:inputType="number"
  android:maxLines="1"
  android:maxLength="2"
  android:imeOptions="actionDone"
  &gt;
  &lt;/EditText&gt;
  &lt;EditText
  android:id="@+id/min"
  android:layout_width="70px"
  android:layout_height="wrap_content"
  android:textSize="18sp"
  android:layout_x="10px"
  android:layout_y="72px"
  android:inputType="number"
  android:maxLines="1"
  android:maxLength="2"
  android:imeOptions="actionDone"
  &gt;
  &lt;/EditText&gt;
  &lt;TextView
  android:id="@+id/max_text"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="Maximum Length"
  android:layout_x="80px"
  android:layout_y="132px"
  &gt;
  &lt;/TextView&gt;
  &lt;TextView
  android:id="@+id/min_text"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="Minimum Length"
  android:layout_x="80px"
  android:layout_y="82px"
  &gt;
  &lt;/TextView&gt;
  &lt;TextView
  android:id="@+id/title"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="Passerator"
  android:textSize="40sp"
  android:textStyle="bold"
  android:layout_x="50px"
  android:layout_y="2px"
  &gt;
  &lt;/TextView&gt;
  &lt;/AbsoluteLayout&gt;
  </code></pre>