问题是打开和fdopen工作,代码:
LOGI("opened %s", strerror( errno ));
int handle= open("/mnt/sdcard/license.rar",O_RDONLY);
LOGI("opened %s", strerror( errno ));
FILE* hNewFile= fdopen(handle,"r");
LOGI("opened handle %d hNewFile %d %s",handle, hNewFile, strerror( errno ));
对应的日志文件:
03-09 14:12:40.151: opened No such file or directory
03-09 14:12:40.160: opened No such file or directory
03-09 14:12:40.160: opened handle 3 hNewFile 0 Invalid argument
我确实拥有正确的清单权限
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
有什么想法吗?