(Transferred from: http://wenku.baidu.com/view/af39b3164431b90d6c85c72f.html)
Xi. Android Learning Day-start of project
Android Knowledge Point learning is over
From today on a project (MP3 player) to become more familiar with the various points of knowledge learned before ~
A simple MP3 player that should include the following modules:
(i) User interface module
(ii) file download module-Download the MP3 and LRC files.
(c) XML parsing module--is responsible for parsing the song list XML downloaded from the server side.
(d) IO module-Responsible for parsing the LRC file; sdcard read and write functions.
(v) MP3 playback Module--It is important to note that the MP3 playback function should be placed in a service so that MP3 can play normally even when the activity is not visible.
(vi) MP3 playback Settings--is responsible for setting the location of the download file, set character encoding.
A tricky problem has been encountered during programming:
Download function, create new folder in SDcard ... Have carefully checked the code, in the Manifest.xml also add the corresponding permissions, or not ...
The result is that when you create a new virtual machine AVD, the size is not set, and the solution is as follows: Windows---> AvD Manager, delete the existing AVD, then create a new AVD, fill size, general 256Mib is enough. Then run the program on this virtual machine, and the problem can be resolved.
Summarized as follows:
If you encounter such problems, you can check the following:
(i) whether the environment.getexternalstoragedirectory (). GetAbsolutePath () is used in the program to obtain the SDcard card path
(ii) See if SDcard is allowed to be readable and writable in the CMD environment
(iii) whether the appropriate permissions have been added to the manifest.xml
Android.promission.INTERNET
Android.promission.WRITE_EXTERNAL_STORAGE
Android.promission.RIDE_EXTERNAL_STORAGE
(iv) Whether the size of the AVD has a value
Xi. Android Learning Day-project start (GO)