intent doesn't work fo me
<p>I have a button in my program named "button1". When I click on it nothing happens, while I expect the program to call <code>AjouteNouveauArticle</code> class.</p>

<p>Moreover, when I run the application on the emulator, I receive this error:</p>

<pre><code>getSlotFromBufferLocked: unknown buffer: 0xa17a7690
</code></pre>

<p>What's wrong?</p>

<p>My Program:</p>

<pre><code>public class PageAccueil extends AppCompatActivity {
    public static ArrayList&lt; ToolType&gt; ToolType = new ArrayList&lt;ToolType&gt;();//llist tol type
    AQuery aq;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_page_accueil);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

    }
    public void next(View view){

        Intent intent1=new Intent(this,MotPasseOublier.class);
        startActivity(intent1);
    }}
</code></pre>

<p>And this is the 2nd class which I want to called when I press on the button1:</p>

<pre><code>  public class AjouteNouveauArticle extends Activity {
        String TempToolID;
        GridView ls;
        MyCustomAdapter myadapter;
        Spinner spinner ;
        AQuery aq;
        ArrayList&lt;AjouteImage&gt; fullsongpath =new ArrayList&lt;AjouteImage&gt;();

        int RESULT_LOAD_IMAGE=1;
        public Bitmap bitmap; // the selected image from gellary


        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_ajoute_nouveau_article);
            final Random rand = new Random();
            String diceRoll =String.valueOf( rand.nextInt(7000000) + 5000);
            TempToolID=EnrigistrementDonnee.UserID+ "000000"+ diceRoll ;

            // initialize the gridview
            fullsongpath.add(new AjouteImage("NewImage", R.drawable.cloud,null));
            ls=(GridView)findViewById(R.id.gridView);
            myadapter=new MyCustomAdapter(fullsongpath);
            ls.setAdapter( myadapter);
            aq=new AQuery(this);
            spinner = (Spinner)findViewById(R.id.spinner);


    // Array of choices // still didinot load data
            if(PageAccueil.ToolType.size()==0) {

                this.finish();
                return;
            }
            String[] ToolTypeArray = new String[PageAccueil.ToolType.size()];
            for (int i = 0; i &lt; PageAccueil.ToolType.size(); i++) {
                ToolTypeArray[i] = PageAccueil.ToolType.get(i).ToolTypeName;
            }
            ArrayAdapter&lt;String&gt; spinnerArrayAdapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_spinner_item, ToolTypeArray);
            spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // The drop down view
            spinner.setAdapter(spinnerArrayAdapter);
        }

        @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            super.onActivityResult(requestCode, resultCode, data);
            if (requestCode == RESULT_LOAD_IMAGE &amp;&amp; resultCode == RESULT_OK &amp;&amp; null != data) {
                //loading images
                int index = fullsongpath.size() - 1;
                if (index &lt; 0)
                    index = 0;
                fullsongpath.remove(index);
                myadapter.notifyDataSetChanged();

                ImageView IVADDPIC=new ImageView(this);
                Uri selectedImage = data.getData();
                String[] filePathColumn = { MediaStore.Images.Media.DATA };
                Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
                cursor.moveToFirst();
                int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
                String picturePath = cursor.getString(columnIndex);
                cursor.close();
                IVADDPIC.setImageBitmap(BitmapFactory.decodeFile(picturePath));
                //load images
                BitmapDrawable drawable = (BitmapDrawable) IVADDPIC.getDrawable();
                Bitmap largeBitmap = drawable.getBitmap();
                int h = 600; // height in pixels
                int w = 600; // width in pixels
                bitmap= Bitmap.createScaledBitmap(largeBitmap, h, w, true);
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
                byte[] Imagedata = baos.toByteArray();
                // ImageView image=new ImageView(this);
                // image.setImageBitmap(bitmap);
                String encodedImageData = Base64.encodeToString(Imagedata, 0);

                Map&lt;String, Object&gt; params = new HashMap&lt;&gt;();
                params.put("image",  encodedImageData );
                params.put("TempToolID", TempToolID);
                String url=EnrigistrementDonnee.ServerURL +"Uses.asmx";
                new MyAsyncGetNewNews().execute(url,encodedImageData,TempToolID);
            }
        }

        public void buAddTool(View view) {
            Toast.makeText(getApplicationContext(),String.valueOf(spinner.getSelectedItemPosition()),Toast.LENGTH_LONG).show();
            EditText ToolName=(EditText)findViewById(R.id.EDTToolName);
            EditText ToolDes=(EditText)findViewById(R.id.EDToolDes);
            EditText  ToolPrice=(EditText)findViewById(R.id.EDTToolPrice);
            //validate user info
            if((ToolName.getText().length()&lt;2 )||(ToolDes.getText().length()&lt;2 ) ||(ToolPrice.getText().length()&lt;2 )) {

              //  Operations.DisplayMessage(this, getResources().getString(R.string.AddAllinfo));

                return;
            }
    // check if he added images
            if(AddImagesPlease==0){
            //    Operations.DisplayMessage(this, getResources().getString(R.string.AddImagesPlease));

                return;
            }

            String url = EnrigistrementDonnee.ServerURL +"aspnet_client"+"/Service"+"/Uses.asmx"+"/AddTolls?UserID="+ EnrigistrementDonnee.UserID+" &amp;ToolName="+ToolName.getText()+"&amp;ToolDes="+ ToolDes.getText()+"&amp;ToolPrice="+ToolPrice.getText()+"&amp;ToolTypeID="+String.valueOf(PageAccueil.ToolType.get(spinner.getSelectedItemPosition()).ToolTypeID) +"&amp;TempToolID=" + String.valueOf(TempToolID);

            aq.ajax(url, JSONObject.class, this, "jsonCallback");

        }
        public void jsonCallback(String url, JSONObject json, AjaxStatus status) throws JSONException {

            if(json != null){
                //successful ajax call
                //successful ajax call
                String msg=json.getString("Message");
                Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();
                int IsAdded=json.getInt("IsAdded");
                if(IsAdded!=0){ // mean the tool is added go to manage tool later
                   // Intent myintents = new Intent(getApplicationContext(), MyTool.class);
                   // startActivity(myintents);
                }
            }else{
                //ajax error
            }

        }
        int AddImagesPlease=0; //number of images that added
        // send image to the webservice
        public class MyAsyncGetNewNews extends AsyncTask&lt;String, String, String&gt; {
            @Override
            protected void onPreExecute() {

            }
            @Override
            protected String  doInBackground(String... params) {
                final String NAMESPACE = "http://tempuri.org/";
                final String URL = params[0];
                final String METHOD_NAME = "UploadImage";
                final String SOAP_ACTION = "http://tempuri.org/UploadImage";
                SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

                request.addProperty("image", params[1]);
                request.addProperty("TempToolID",params[2]);


                SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

                envelope.dotNet = true;
                envelope.setOutputSoapObject(request);
                HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);


                try{
                    androidHttpTransport.call(SOAP_ACTION, envelope);
                    Object obj = envelope.bodyIn;
                    SoapObject result = (SoapObject) envelope.getResponse();

                }

                catch(Exception e){
                    e.printStackTrace();
                }

                return null;
            }
            protected void onProgressUpdate(String... progress) {




            }
            protected void onPostExecute(String  result2){
                int index=fullsongpath.size() - 1;
                if(index&lt;0)
                    index=0;
                fullsongpath.remove(index);
                fullsongpath.add(index, new AjouteImage("NewImage", R.drawable.cloud, null));
                myadapter.notifyDataSetChanged();
                ls.smoothScrollToPosition(fullsongpath.size() - 1);
                AddImagesPlease=AddImagesPlease+1;
            }

        }
</code></pre>

<p>The resource file: </p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"

    tools:context="com.mstr.malik.myProject.AjouteNouveauArticle"&gt;
    &lt;ScrollView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"&gt;

        &lt;LinearLayout

            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:paddingRight="10dp"
            android:paddingTop="10dp"&gt;

            &lt;LinearLayout
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/LLogin"
                android:layout_marginTop="7dp"
                android:paddingLeft="4dp"
                android:paddingTop="4dp"&gt;


                &lt;LinearLayout
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:touchscreenBlocksFocus="false"
                    android:layout_marginBottom="2dp"&gt;

                    &lt;EditText
                        android:maxLength="35"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:inputType="text"
                        android:ems="10"
                        android:id="@+id/EDTToolName"
                        android:layout_weight="1"
                        android:textColor="#ff1a102c"

                        android:textSize="18dp"
                        android:paddingBottom="9dp"
                        android:paddingTop="9dp"
                        android:layout_marginBottom="10dp"/&gt;
                &lt;/LinearLayout&gt;

                &lt;LinearLayout
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:touchscreenBlocksFocus="false"
                    android:layout_marginBottom="2dp"&gt;

                    &lt;EditText
                        android:inputType="textMultiLine"
                        android:singleLine="false"
                        android:maxLength="400"
                        android:maxLines="4"
                        android:lines="4"
                        android:layout_width="fill_parent"
                        android:layout_height="100dp"
                        android:ems="10"
                        android:id="@+id/EDToolDes"
                        android:layout_weight="1"
                        android:textColor="#ff1a102c"

                        android:textSize="18dp"
                        android:paddingBottom="9dp"
                        android:paddingTop="9dp"
                        android:layout_marginBottom="10dp"
                        /&gt;

                &lt;/LinearLayout&gt;

                &lt;LinearLayout
                    android:gravity="right"
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:touchscreenBlocksFocus="false"
                    android:layout_marginBottom="2dp"&gt;

                    &lt;EditText
                        android:maxLength="15"
                        android:layout_width="70pt"
                        android:layout_height="wrap_content"
                        android:ems="10"
                        android:id="@+id/EDTToolPrice"
                        android:layout_weight="1"
                        android:textColor="#ff1a102c"
                        android:textSize="18dp"
                        android:paddingBottom="9dp"
                        android:paddingTop="9dp"
                        android:layout_marginBottom="10dp"
                        android:inputType="number" /&gt;
                &lt;/LinearLayout&gt;

                &lt;LinearLayout

                    android:layoutDirection="rtl"
                    android:orientation="horizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"

                    android:layout_marginBottom="15dp"
                    android:layout_marginTop="5dp"&gt;

                    &lt;TextView

                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="tool type"
                        android:id="@+id/textView"
                        android:layout_weight="0"
                        android:textColor="#000000"
                        android:textSize="16dp"
                        android:textStyle="bold" /&gt;
                    &lt;Spinner
                        android:id="@+id/spinner"
                        android:layout_width="150dp"
                        android:layout_height="wrap_content" /&gt;

                &lt;/LinearLayout&gt;

            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:layoutDirection="rtl"
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="match_parent"&gt;

                &lt;TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="click to add image"
                    android:id="@+id/textView2" /&gt;

                &lt;GridView
                    android:background="#ffffff"
                    android:horizontalSpacing="5dp"
                    android:verticalSpacing="5dp"
                    android:columnWidth="110dp"

                    android:numColumns="auto_fit"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:id="@+id/gridView" /&gt;

                &lt;Button
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="AddTool"
                    android:drawablePadding="2dp"
                    android:id="@+id/BuSaveSetting"
                    android:background="@drawable/register_button"
                    android:layout_marginBottom="10dp"
                    android:textColor="#ff06071c"
                    android:onClick="buAddTool"
                    android:layout_weight="0"
                    android:layout_marginLeft="15dp"
                    android:layout_marginTop="15dp" /&gt;

            &lt;/LinearLayout&gt;

        &lt;/LinearLayout&gt;
    &lt;/ScrollView&gt;
&lt;/RelativeLayout&gt;
</code></pre>