简体   繁体   English

如何在Android 2.3 Project的res / raw文件夹中存储大约12MB的MP3文件?

[英]How to store around 12MB of MP3 files in res/raw folder of my Android 2.3 Project?

I am developing a small application in Android 2.3 using Eclipse 3.4 IDE, I wish to store more than 200 mp3 files in the res/raw folder of my project. 我正在使用Eclipse 3.4 IDE在Android 2.3中开发一个小型应用程序,我希望在项目的res / raw文件夹中存储200多个mp3文件。 But Wen I started the Android Emulator,it stop working by showing this message in console: 但是Wen我启动了Android Emulator,它通过在控制台中显示此消息来停止工作:

"INSTALL_FAILED_INSUFFICIENT_STORAGE" “ INSTALL_FAILED_INSUFFICIENT_STORAGE”

Please tell me a way out from this problem 请告诉我解决这个问题的方法

I think the error is explicit enough. 我认为该错误足够明显。 The app is too large in size for the internal storage. 该应用的大小对于内部存储来说太大。 I think it's time to redesign your app. 我认为是时候重新设计您的应用了。 For instance you can download the mp3 file from the network on demand and then save it to the sdcard. 例如,您可以根据需要从网络下载mp3文件,然后将其保存到sdcard。

BTW, if you plan to support just Android version > 2.2 you can add android:installLocation="preferExternal" into your manifest file and this should rid the problem 顺便说一句,如果您打算仅支持Android版本> 2.2,则可以将android:installLocation="preferExternal"到清单文件中,这应该可以解决此问题

Decreate the bit rate of mp3 files! 删除mp3文件的比特率! I think 8bit could be fine if you predict that a user will not listen your mp3s via external speaker. 我认为,如果您预测用户不会通过外部扬声器收听mp3,则8bit可能会很好。

If you have files that will be listened via external speaker, than decrease bit rate in all files except in those. 如果您有可以通过外部扬声器收听的文件,则应降低除这些文件以外的所有文件的比特率。

If you cannot use any of these actions, then you made a big mistake in an application design. 如果您不能使用这些操作中的任何一个,那么您就在应用程序设计中犯了一个大错误。

PS. PS。 if it's not a secret, could you tell me what kind of app needs 200 mp3 files? 如果不是秘密,您能告诉我哪种应用需要200个mp3文件吗?

Do you have to use MP3? 您必须使用MP3吗? Android docs suggest you should use OGG where possible. Android文档建议您应尽可能使用OGG。

The Installation of this app was failed due to the insufficient storage space available in the Android Emulator. 由于Android模拟器中可用的存储空间不足,因此该应用的安装失败。

And this was removed when I run the app in a new Emulator with sufficient amount of memory space available for successful installation of the apps. 当我在具有足够内存空间以成功安装应用程序的新仿真器中运行应用程序时,将其删除。

Now this app is successfully running in the new Emulator. 现在,此应用已在新的模拟器中成功运行。 Thanks for your support. 谢谢你的支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM