Note that there are some explanatory texts on larger screens.

plurals
  1. POPlay developer console: 2 error reports on 13k active users
    primarykey
    data
    text
    <p>I have a small question as a starting developer. I've created an app that has been downloaded quite a lot last 2 weeks and has 13k active users. I've tested this on a few (Samsung) phones and of course in the emulator. I can't generate any errors, since the app is simple I wasn't expecting it to do so.</p> <p>But today I've looked into my Play Developer Console and found 2 error reports. Is this something that I should be concerned about or can this errors be randomly generated? I know for example that bad custom roms can create a crash, I've experienced this myself.</p> <p>I will post the class that created this, this plays a selected sound when a button is clicked. One of the crashes in a nullPointerException when the button was clicked, the other was a illegalStateException that was generated when mp.stop() was called. To me it seems not possible that this generates an error, but of course I could be wrong. This is the code:</p> <pre><code>public class SoundActivity extends Activity implements OnClickListener, OnCheckedChangeListener { Button btn; MediaPlayer mp; RadioGroup slct; RadioButton radio0, radio1, radio2, radio3, radio4; int t = 1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.btclayout); initialize(); btn.setOnClickListener(this); slct.setOnCheckedChangeListener(this); mp = MediaPlayer.create(this, R.raw.sound1); } public void initialize() { btn = (Button) findViewById(R.id.button1); slct = (RadioGroup) findViewById(R.id.radioGroup1); radio0 = (RadioButton) findViewById(R.id.radio0); radio1 = (RadioButton) findViewById(R.id.radio1); radio2 = (RadioButton) findViewById(R.id.radio2); radio3 = (RadioButton) findViewById(R.id.radio3); radio4 = (RadioButton) findViewById(R.id.radio4); } @Override public void onClick(View v) { // TODO Auto-generated method stub mp.stop(); mp.reset(); switch (t) { case 1: mp = MediaPlayer.create(this, R.raw.sound1); break; case 2: mp = MediaPlayer.create(this, R.raw.sound2); break; case 3: mp = MediaPlayer.create(this, R.raw.sound3); break; } mp.start(); } @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); mp.release(); } @Override protected void onResume() { // TODO Auto-generated method stub super.onResume(); mp = MediaPlayer.create(this, R.raw.sound1); } @Override public void onCheckedChanged(RadioGroup arg0, int arg1) { // TODO Auto-generated method stub switch (arg1) { case R.id.radio0: t = 1; break; case R.id.radio1: t = 2; break; case R.id.radio2: t = 3; break; case R.id.radio3: t = 4; break; case R.id.radio4: t = 5; break; } } } </code></pre> <p>Edit: This are the stacktraces from the Play Console:</p> <blockquote> <p>java.lang.IllegalStateException at android.media.MediaPlayer._stop(Native Method) at android.media.MediaPlayer.stop(MediaPlayer.java:1033) at com.ddroid.DisMyApp.SoundActivity.onClick(SoundActivity.java:57) at android.view.View.performClick(View.java:3549) at android.view.View$PerformClick.run(View.java:14400) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:4944) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method)</p> </blockquote> <p>The second one:</p> <blockquote> <p>java.lang.NullPointerException at com.ddroid.DisMyApp.SoundActivity.onClick(SoundActivity.java:76) at android.view.View.performClick(View.java:2538) at android.view.View$PerformClick.run(View.java:9152) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3687) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) at dalvik.system.NativeStart.main(Native Method)</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    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