Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (retired 2014) Pretty Little Things Adding Sounds

Jeremy Broutin
Jeremy Broutin
1,951 Points

Sound doesn't play on Nexus 5 running Android KitKat 4.4.3

Despite strictly following code implementation and now error being shown in Logcat (except 'Should have subtitle controller already set' but which shouldn't impact the sound to be played (I think)), I cannot get the sound effect to work when using both button onClick or onShake.

Anybody else having a similar issue ?

Kate Hrycak
Kate Hrycak
5,542 Points

Hey Jeremy, sounds like it's a device specific issue with MediaPlayer on KitKat. I found this: http://stackoverflow.com/questions/20166186/android-mediaplayer-warning-should-have-subtitle-controller-already-set Unfortunately, my Android skills aren't really up there yet to help you troubleshoot this one. Hopefully someone else can chime in, or you can walk through the steps pretending there is an awesome chime noise when you shake the device and the ball animates. Sorry!

1 Answer

Jeremy Broutin
Jeremy Broutin
1,951 Points

Hi Kate,

Thanks for the taking the time to look into it.

I had found the same thread on stackoverflow, but I couldn't really get something out of it. However, you are right: it is indeed a device specific issue.

I had one my friend testing it on a Samsung Galaxy 2 running a previous version of Android, and the sound worked (although my friend told me the sound was very very loud without the possibility to adjust it lol).

Anyway, I will see how behave others sounds from the next apps in the learning path and hopefully will be luckier ;)

Cheers