Fatal exception by startActivity
<p>I have two Activiti (Smena and Sdacha)
I push the button on Smena and opening Sdacha.
I need send String from textView Sdacha to Smena.
When I push the button on Sdacha I get ERROR</p>

<pre><code>public class Sdacha extends Activity 
{
    @Override
    protected void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.sdacha);    

        Button but10=(Button) findViewById(R.id.button10);
        but10.setOnClickListener(
                new OnClickListener() 
                {
                    @Override
                    public void onClick(View arg0) 
                    {
                        Intent intent1=new Intent(Sdacha.this,Smena.class);

                             startActivity(intent1);
                    }
            });

    }
}
</code></pre>

<p>></p>

<pre><code> 12-25 18:05:40.130: WARN/dalvikvm(378): threadid=1: thread exiting
&gt; with uncaught exception (group=0x40014760) 12-25 18:05:40.151:
&gt; ERROR/AndroidRuntime(378): FATAL EXCEPTION: main 12-25 18:05:40.151:
&gt; ERROR/AndroidRuntime(378): java.lang.RuntimeException: Unable to start
&gt; activity ComponentInfo{com.example.master/com.example.master.Smena}:
&gt; java.lang.NullPointerException 12-25 18:05:40.151:
&gt; ERROR/AndroidRuntime(378):     at
&gt; android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815)
&gt; 12-25 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
&gt; 12-25 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.app.ActivityThread.access$500(ActivityThread.java:122) 12-25
&gt; 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
&gt; 12-25 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.os.Handler.dispatchMessage(Handler.java:99) 12-25
&gt; 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.os.Looper.loop(Looper.java:132) 12-25 18:05:40.151:
&gt; ERROR/AndroidRuntime(378):     at
&gt; android.app.ActivityThread.main(ActivityThread.java:4123) 12-25
&gt; 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; java.lang.reflect.Method.invokeNative(Native Method) 12-25
&gt; 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; java.lang.reflect.Method.invoke(Method.java:491) 12-25 18:05:40.151:
&gt; ERROR/AndroidRuntime(378):     at
&gt; com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
&gt; 12-25 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) 12-25
&gt; 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; dalvik.system.NativeStart.main(Native Method) 12-25 18:05:40.151:
&gt; ERROR/AndroidRuntime(378): Caused by: java.lang.NullPointerException
&gt; 12-25 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; com.example.hotdog_master.Smena.onCreate(Smena.java:42) 12-25
&gt; 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.app.Activity.performCreate(Activity.java:4397) 12-25
&gt; 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
&gt; 12-25 18:05:40.151: ERROR/AndroidRuntime(378):     at
&gt; android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
&gt; 12-25 18:05:40.151: ERROR/AndroidRuntime(378):     ... 11 more
</code></pre>

<p>Smena Activiti it is activity for cashier
Smena Activity code:</p>

<pre><code>public class Smena extends Activity 
{
    public Nomenklatura Asortiment=new Nomenklatura(100);
    public static final String DEBUG_TAG = "myLogs";
    ArrayList&lt;String&gt; data =new ArrayList&lt;String&gt; ();
    ArrayList&lt;String&gt; data2 =new ArrayList&lt;String&gt; (4);
    GridView gvMain;
    GridView gvMain2;
    ArrayAdapter&lt;String&gt; adapter;
    ArrayAdapter&lt;String&gt; adapter2;
    double Sum=0;

    @Override
    protected void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.smena); 
        Asortiment=(Nomenklatura) getIntent().getExtras().getSerializable("Nomenklatura");

        data2.add("СУММА");
        data2.add("0");
        data2.add("СДАЧА");
        data2.add("0");

        adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.item, R.id.tvText, data);
        gvMain = (GridView) findViewById(R.id.gridView1);
        gvMain.setAdapter(adapter);

        adapter2 = new ArrayAdapter&lt;String&gt;(this, R.layout.item2, R.id.tvText, data2);
        gvMain2 = (GridView) findViewById(R.id.gridView2);
        gvMain2.setAdapter(adapter2);

        Button but1=(Button) findViewById(R.id.button1);
        but1.setOnClickListener(
                new OnClickListener() 
                {
                    @Override
                    public void onClick(View arg0) 
                    {
                        ButtonOn (1);
                    }
            });
        Button but21=(Button) findViewById(R.id.button21);
        but21.setOnClickListener(
                new OnClickListener() 
                {
                    @Override
                    public void onClick(View arg0) 
                    {
                        ButtonDel();
                    }
            });

        Button but22=(Button) findViewById(R.id.button22);
        but22.setOnClickListener(
                new OnClickListener() 
                {
                    @Override
                    public void onClick(View arg0) 
                    {
                        data.clear();
                        adapter.clear();

                    }
            });

        Button but23=(Button) findViewById(R.id.button23);
        but23.setOnClickListener(
                new OnClickListener() 
                {
                    @Override
                    public void onClick(View arg0) 
                    {
                        Intent intent1=new Intent(Smena.this,Login.class);
                        // intent1.putExtra("Sdacha", Asortiment);
                         startActivity(intent1);

                    }
            });
    }
    private void ButtonDel()
    {
        int cnt=    data.size();
        data.remove(cnt-1);
        data.remove(cnt-2);
        adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.item, R.id.tvText, data);
        gvMain.setAdapter(adapter);
    }

    private void ButtonOn (int Art)
    {
        String name=    Asortiment.name.get(1);
        String price=   Asortiment.price.get(1).toString();
        data.add(name);
        data.add(price);
        adapter = new ArrayAdapter&lt;String&gt;(this, R.layout.item, R.id.tvText, data);
        gvMain.setAdapter(adapter); 
    }
    private void CheckSum()
    {
        Sum=0;
        for(int k=1;k&lt;data.size();k=k+2)
        {
            Sum=Sum+Double.parseDouble(data.get(k));
        }
    }

}
</code></pre>
