Note that there are some explanatory texts on larger screens.

plurals
  1. POjava.lang.NullPointerException long baba1
    primarykey
    data
    text
    <p>I am sending <code>long</code> value and <code>String</code> value as extras from list activity to agenmin activity.But get <code>java.lang.NullPointerException</code> at <code>line 120</code></p> <pre><code> long baba1 = intent1.getExtras().getLong("baba",0); //line number 120 </code></pre> <p>Sending from list activity</p> <pre><code> // long id from from listview Intent i = new Intent(list.this, agenmin.class); i.putExtra("baba", id); startActivity(i); //int position from listview String c= Integer.toString(position); Intent i1 = new Intent(list.this, agenmin.class); i1.putExtra("abc", c); startActivity(i1); </code></pre> <p>At receiving side agenmin</p> <pre><code> Intent i1 = getIntent(); String easyPuzzle; easyPuzzle=i1.getStringExtra("abc"); textView2.setText(easyPuzzle); Toast.makeText(getApplicationContext(), "Position " + (mess)+" ROWID " +(easyPuzzle), Toast.LENGTH_LONG).show(); Intent intent1 = getIntent(); long baba1 = intent1.getExtras().getLong("baba",0); String strLong1 = Long.toString(baba1); textView3.setText(strLong1); </code></pre> <p><strong>Logcat:</strong></p> <pre><code> 05-27 20:43:45.169: E/AndroidRuntime(593): FATAL EXCEPTION: main 05-27 20:43:45.169: E/AndroidRuntime(593): java.lang.NullPointerException 05-27 20:43:45.169: E/AndroidRuntime(593): at com.indianic.demo.calendark.agenmin$1.onClick(agenmin.java:120) </code></pre> <p>I started the agenmin activity twice thats the reason for '<code>java.lang.NullPointerException</code> at <code>line 120</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload