I am using a media codec class in Android (Jelly Bean) to encode PCM format to AAC. The file was encoded but no music player is able to play that file. I was not able to find an
There's an android AAC Library https://github.com/timsu/android-aac-enc
Try passing your buffers through this library. It might help.