我在android平台上编MP3,在下载MP3到sdcard的时候,总是出现“java.io.IOException:read-only file system”的警告,我在androidmanifest.xml上也写了“<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>”这个权限的。可是老是提示警告,创建文件不能成功,不能往sdcard上写文件,logcat里提示这个警告:“java.io.IOException:read-only file system” 。
我不知道是我哪里错了,大大们跟我指点啊。谢谢你们了。。
不胜感激啊。。
我不知道是我哪里错了,大大们跟我指点啊。谢谢你们了。。
不胜感激啊。。
必须加载<application>...</application>的外面,即与其同级。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.weather_report"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".WeatherReport"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> </application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
然后mksdcard [-l label] <size> <file> mksdcard -l mysdcard 512M c:\android_sdcard\sdcard.image然后创建模拟器的时候再选择这个image镜像,就可以了