【发布时间】:2016-01-07 18:24:01
【问题描述】:
使用 Android JNI,我创建了文件并使用文件描述符写入数据。
示例:-
dest = memalign( BLKSIZE, sz);
if (dest == NULL) {
LOGE("Unable to allocate memory");
return -1;
}
memcpy(dest, bufferIn, sz);
int rc = write(fd, dest, sz);
LOGI("write %d bytes.", rc);
free(dest);
if(rc == -1) {
LOGI("Error in writing : %d %s\n", errno, strerror(errno));
}
写入成功,我可以看到文件中的数据。但是对于每次写入,我都会登录 adb logcat。
01-06 12:46:36.831 16292-16806/com.test.example I/io: write 1024 bytes.
01-06 12:46:36.831 16292-16806/com.test.example W/art: Attempt to remove
local handle scope entry from IRT, ignoring.
- 此日志的含义:- 我无法理解,或者此日志的含义。
/W/art:尝试从 IRT 中删除本地句柄范围条目,忽略/
- 是否与应用相关的事情需要处理。
【问题讨论】:
标签: java android android-ndk java-native-interface