如何得到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(); }输出流那直接异常了。。不知为何。。 使用代码为textview设置drawableLeft eclipse不能识别小米手机 怎样设置Default Activity 关于android上显示PDF ViewGroup使用Adapter android 错误 我自己写的一个SurfaceView为什么显示不出来呢? android 中 viewpager 怎么上传文件到php服务器? jackson2.8 Map转json报出com.fasterxml.jackson.annotation.JsonIgnorePropert... 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();
}
输出流那直接异常了。。不知为何。。