S sarim123 Member Licensed User Longtime User Feb 26, 2013 #1 Im getting a null pointer error on my phone when i hit stop and when i change the volume for the music, i have no clue why. Here is the error for the stop button B4X: Expand Collapse Copy An error has occured in sub:page2_button69_click(java line: 347) java.lang.NullPointerException Continue? Here is for the volume B4X: Expand Collapse Copy An error has occured in sub:page2_barvolume_valuechanged(java line: 260) java.lang.NullPointerException Continue? Here is the project https://www.dropbox.com/s/xeprj5s3j8ot989/Sounds.zip Thanks
Im getting a null pointer error on my phone when i hit stop and when i change the volume for the music, i have no clue why. Here is the error for the stop button B4X: Expand Collapse Copy An error has occured in sub:page2_button69_click(java line: 347) java.lang.NullPointerException Continue? Here is for the volume B4X: Expand Collapse Copy An error has occured in sub:page2_barvolume_valuechanged(java line: 260) java.lang.NullPointerException Continue? Here is the project https://www.dropbox.com/s/xeprj5s3j8ot989/Sounds.zip Thanks
stevel05 Expert Licensed User Longtime User Feb 26, 2013 #2 This is because you are trying to stop a mediaplayer object, or change it's volume before you have initialized it. If you play all of the sounds first the error doesn't happen. You could move all of the initializations to the activity create. Upvote 0
This is because you are trying to stop a mediaplayer object, or change it's volume before you have initialized it. If you play all of the sounds first the error doesn't happen. You could move all of the initializations to the activity create.