如何得到assets中的文件绝对路径, 你是指你工程里的assets目录? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知道,我都是吧assets里的文件先复制出来再操作 assets中有个aa.txt。。把它复制出来:代码:try { InputStream in = getResources().getAssets().open(assetsFileName); OutputStream out = new FileOutputStream(filepath+"tessdata/"+assetsFileName); -------》执行到这异常了?? byte[] buffer = new byte[1024]; int length = in.read(buffer); while(length > 0) { out.write(buffer, 0, length); length = in.read(buffer); } out.flush(); in.close(); out.close(); } catch (Exception e) { e.printStackTrace(); }输出流那直接异常了。。不知为何。。 在android上开发地铁图如何做 NDK C++中头文件定义一个类 编译的时候报错NDK 不支持C++中的类么? Android SDK Manager启动时出现问题。求助!! android中多选子菜单的问题 android 下拉显示列表,不是spinner 请教: android手机在锁屏后一段时间会将应用程序挂起 Unable to open trace file 请问如何处理Android横竖屏的问题. 怎么调用citrix receiver~~~~~ 求解决 Android应用 访问 内网? 关于退出activity卡慢的问题
try {
InputStream in = getResources().getAssets().open(assetsFileName);
OutputStream out = new FileOutputStream(filepath+"tessdata/"+assetsFileName); -------》执行到这异常了??
byte[] buffer = new byte[1024];
int length = in.read(buffer);
while(length > 0)
{
out.write(buffer, 0, length);
length = in.read(buffer);
}
out.flush();
in.close();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
输出流那直接异常了。。不知为何。。