java-JOBB DirectoryFullException:de.waldheinz.fs.fat.DirectoryFullException:目录已满

java-JOBB DirectoryFullException:de.waldheinz.fs.fat.DirectoryFullException:目录已满,第1张

概述我正在尝试在包含192个jpg文件(共约70mb)的目录上使用JOBB工具.当我以jobb-dC:/sdk/tools/dir/data-k123456-ocom.nick.app.obb-pncom.nick.app-pv1运行命令时,它将生成以下日志:Slop:0DirectoryOverhead:0Slop:189853DirectoryOverhead:24704Part

我正在尝试在包含192个jpg文件(共约70 mb)的目录上使用JOBB工具.当我以jobb -d C:/ sdk / tools / dir / data -k 123456 -o com.nick.app.obb -pn com.nick.app -pv 1运行命令时,它将生成以下日志:

Slop: 0   Directory Overhead: 0Slop: 189853   Directory Overhead: 24704Partial Sector [32] writing to sector: 277Partial Sector [32] writing to sector: 277Partial Sector [32] writing to sector: 277Partial Sector [299] writing to sector: 897Partial Sector [416] writing to sector: 1733Partial Sector [148] writing to sector: 2385Partial Sector [95] writing to sector: 3013Partial Sector [498] writing to sector: 3573Partial Sector [146] writing to sector: 4061Partial Sector [427] writing to sector: 4581Partial Sector [204] writing to sector: 5213Partial Sector [115] writing to sector: 5769Partial Sector [69] writing to sector: 6481Partial Sector [79] writing to sector: 7077Partial Sector [346] writing to sector: 7661Partial Sector [93] writing to sector: 8213Partial Sector [120] writing to sector: 8857Partial Sector [423] writing to sector: 9461Partial Sector [4] writing to sector: 10149Partial Sector [184] writing to sector: 11065Partial Sector [479] writing to sector: 11921Partial Sector [83] writing to sector: 12569Partial Sector [358] writing to sector: 13241Partial Sector [378] writing to sector: 14009Partial Sector [366] writing to sector: 14669Partial Sector [393] writing to sector: 15677Partial Sector [323] writing to sector: 16385Partial Sector [236] writing to sector: 16989Partial Sector [233] writing to sector: 17645Partial Sector [503] writing to sector: 18345Partial Sector [348] writing to sector: 19017Partial Sector [473] writing to sector: 19721Partial Sector [192] writing to sector: 20345Partial Sector [398] writing to sector: 20805Partial Sector [67] writing to sector: 21617Partial Sector [3] writing to sector: 22437Partial Sector [315] writing to sector: 23489Partial Sector [161] writing to sector: 24045Partial Sector [421] writing to sector: 24569Partial Sector [465] writing to sector: 25557Partial Sector [164] writing to sector: 26485Partial Sector [458] writing to sector: 27177Partial Sector [412] writing to sector: 28153Partial Sector [1] writing to sector: 28633Partial Sector [119] writing to sector: 29441Partial Sector [367] writing to sector: 30413Partial Sector [274] writing to sector: 31397Partial Sector [325] writing to sector: 32369Partial Sector [355] writing to sector: 33361Partial Sector [187] writing to sector: 34025Partial Sector [136] writing to sector: 34829Partial Sector [157] writing to sector: 35873Partial Sector [175] writing to sector: 36733Partial Sector [106] writing to sector: 37673Partial Sector [79] writing to sector: 38593Partial Sector [379] writing to sector: 39545Partial Sector [296] writing to sector: 40517Partial Sector [440] writing to sector: 41205Partial Sector [277] writing to sector: 41985Partial Sector [153] writing to sector: 42609Partial Sector [484] writing to sector: 43385Partial Sector [363] writing to sector: 44329Partial Sector [510] writing to sector: 45097Partial Sector [296] writing to sector: 46101Partial Sector [314] writing to sector: 47081Partial Sector [244] writing to sector: 48073Partial Sector [187] writing to sector: 48825Partial Sector [253] writing to sector: 49825Partial Sector [374] writing to sector: 50833Partial Sector [508] writing to sector: 51777Partial Sector [26] writing to sector: 52517Partial Sector [192] writing to sector: 53385Partial Sector [137] writing to sector: 54209Partial Sector [312] writing to sector: 55029Partial Sector [145] writing to sector: 55829Partial Sector [394] writing to sector: 56517Partial Sector [150] writing to sector: 57317Partial Sector [81] writing to sector: 58197Partial Sector [198] writing to sector: 59101Partial Sector [358] writing to sector: 59929Partial Sector [397] writing to sector: 60729Partial Sector [142] writing to sector: 61209Partial Sector [148] writing to sector: 62193Partial Sector [365] writing to sector: 62833Partial Sector [93] writing to sector: 63293Partial Sector [450] writing to sector: 63701Partial Sector [10] writing to sector: 64485Partial Sector [354] writing to sector: 64969Partial Sector [174] writing to sector: 65441Partial Sector [435] writing to sector: 65961Partial Sector [64] writing to sector: 66553Partial Sector [41] writing to sector: 67053Partial Sector [463] writing to sector: 67489Partial Sector [177] writing to sector: 68041Partial Sector [403] writing to sector: 68509Partial Sector [479] writing to sector: 69305Partial Sector [248] writing to sector: 69761Partial Sector [331] writing to sector: 70245Partial Sector [361] writing to sector: 70745Partial Sector [56] writing to sector: 71281Partial Sector [301] writing to sector: 71805Partial Sector [253] writing to sector: 72629Partial Sector [461] writing to sector: 73041Partial Sector [304] writing to sector: 73561Partial Sector [218] writing to sector: 74105Partial Sector [147] writing to sector: 74765Partial Sector [303] writing to sector: 75365Partial Sector [410] writing to sector: 76321Partial Sector [280] writing to sector: 77137Partial Sector [484] writing to sector: 77697Partial Sector [344] writing to sector: 78465Partial Sector [189] writing to sector: 79001Partial Sector [126] writing to sector: 79413Partial Sector [262] writing to sector: 79929Partial Sector [187] writing to sector: 80317Partial Sector [465] writing to sector: 80869Partial Sector [350] writing to sector: 81313Partial Sector [236] writing to sector: 81793Partial Sector [98] writing to sector: 82333Partial Sector [223] writing to sector: 83209Partial Sector [1] writing to sector: 83593Partial Sector [51] writing to sector: 84577Partial Sector [340] writing to sector: 84993Partial Sector [377] writing to sector: 85961Partial Sector [232] writing to sector: 86829Partial Sector [229] writing to sector: 87253Partial Sector [337] writing to sector: 88225Partial Sector [205] writing to sector: 89285Partial Sector [353] writing to sector: 90089Partial Sector [289] writing to sector: 90921Partial Sector [369] writing to sector: 91969Partial Sector [283] writing to sector: 92741Partial Sector [267] writing to sector: 93553Partial Sector [313] writing to sector: 94049Partial Sector [363] writing to sector: 94521Partial Sector [415] writing to sector: 95245Partial Sector [181] writing to sector: 96269Partial Sector [420] writing to sector: 96733Partial Sector [251] writing to sector: 97733Partial Sector [244] writing to sector: 98221Partial Sector [406] writing to sector: 98669Partial Sector [226] writing to sector: 99069Partial Sector [363] writing to sector: 100045Partial Sector [133] writing to sector: 100769Partial Sector [461] writing to sector: 101209Partial Sector [329] writing to sector: 102337Partial Sector [495] writing to sector: 103201Partial Sector [452] writing to sector: 104045Partial Sector [97] writing to sector: 105153Partial Sector [236] writing to sector: 106177Partial Sector [10] writing to sector: 106645Partial Sector [292] writing to sector: 107725Partial Sector [36] writing to sector: 108725Partial Sector [500] writing to sector: 109793Partial Sector [441] writing to sector: 110681Partial Sector [128] writing to sector: 111329Partial Sector [293] writing to sector: 112277Partial Sector [382] writing to sector: 112737Partial Sector [493] writing to sector: 113229Partial Sector [256] writing to sector: 113653Partial Sector [20] writing to sector: 114893Partial Sector [351] writing to sector: 115905Partial Sector [110] writing to sector: 116913Partial Sector [322] writing to sector: 118041Partial Sector [156] writing to sector: 118589Partial Sector [232] writing to sector: 119013Partial Sector [331] writing to sector: 119533Partial Sector [297] writing to sector: 120509Partial Sector [310] writing to sector: 121549Partial Sector [392] writing to sector: 122545Partial Sector [285] writing to sector: 123485Partial Sector [108] writing to sector: 124065de.waldheinz.fs.fat.DirectoryFullException: directory is full        at de.waldheinz.fs.fat.Fat16RootDirectory.changeSize(Fat16RootDirectory.java:109)        at de.waldheinz.fs.fat.AbstractDirectory.addEntrIEs(AbstractDirectory.java:282)        at de.waldheinz.fs.fat.FatLfnDirectory.addfile(FatLfnDirectory.java:139)        at com.androID.jobb.Main.processfile(Main.java:475)        at com.androID.jobb.Main.processAllfiles(Main.java:604)        at com.androID.jobb.Main.processAllfiles(Main.java:600)        at com.androID.jobb.Main.main(Main.java:417)Exception in thread "main" java.lang.RuntimeException: Error adding file with name: img178.jpg        at com.androID.jobb.Main.processfile(Main.java:478)        at com.androID.jobb.Main.processAllfiles(Main.java:604)        at com.androID.jobb.Main.processAllfiles(Main.java:600)        at com.androID.jobb.Main.main(Main.java:417)

有什么建议吗?

解决方法:

根本原因分析:

de.waldheinz.fs.fat.DirectoryFullException: directory is full

当Fat16RootDirectory变满或ClusterChainDirectory超出其ClusterChainDirectory的最大大小(512 MB)时,就会发生此错误

异常发生在哪里? :DirectoryFullException.java

DirectoryFullException(int currentCapacity, int requestedCapacity) {    this("directory is full", currentCapacity, requestedCapacity);}

对于这个问题,我希望有一个解决方案和一些建议.希望对您有所帮助.

方案1:

在windows上:如果您的文件夹“数据”丢失图片,并复制到androID sdk-tools目录

data/1.jpgdata/2.jpgdata/3.jpgdata/...data/5000.jpg

而你用

console>>>jobb -d C:/sdk/tools/dir/data -k 123456 -o com.nick.app.obb -pn com.nick.app -pv 1

您将得到提到的错误.尝试添加一个目录层次结构并将“数据”目录创建到子文件夹

root/data/1.jpgroot/data/2.jpgroot/data/3.jpgroot/data/...root/data/5000.jpg

采用

console>>>jobb -d C:/sdk/tools/dir/root/data -k 123456 -o com.nick.app.obb -pn com.nick.app -pv 1

您必须牢记,如果以后要阅读Obb,则图片现在位于子文件夹中.

资源链接:

> Using jobb tool in Android
> What causes jobb tool to throw FAT Full IOException?

Suggestion-1:

要检查扇区/群集/ FAT大小,请运行“ jobb -v -dump [obb]”.这将打印一堆信息,包括“每个群集的扇区”和“每个FAT的扇区”.

在我的旧.obb文件中,这些值分别为8和150. 8不是150的倍数,因此我可能遇到了上述内核错误.

您需要确保使用更新的jobb.jar和fat32lib.jar来解决此问题.使用Google云端硬盘上的当前库版本,我现在每个群集获得8个扇区,每个FAT获得184个扇区.

我尚未验证这是否可以解决我之前看到的数据损坏问题.我将进行更多测试,并在此处报告.

建议2:

Hacking can solve the issue.但是占用了更多的内存:

这个问题的确开始变得非常无聊.今天,我有点想出了一个解决办法,这很荒谬,但是看起来好像向.obb添加额外数据似乎可以解决问题(至少对我而言).确切地说,我的原始.obb文件大小为110MB,现在为220MB,应用程序读取数据时不会损坏.到目前为止,这是我迄今为止对应用程序所做的最肮脏的黑客攻击,对此我并不感到骄傲,但是,至少现在正在运行. :p

建议-3:

2015年10月19日,他们发布了更新版本:android-sdk-fat32lib

该版本解决了与AndroID SDK一起发布的JOBB工具(自AndroID SDK 23开始)产生的问题,该工具无法生成大于512M的OBB文件.

更新:

您将在以下部分中获得原始版本和修改版本的源代码:

>原始版本提供https://github.com/waldheinz/fat32-lib/
>可在以下位置获得修改版本
https://android.googlesource.com/platform/external/fat32lib/

要从源代码制作jar文件,可以按照以下教程进行:

> How to create an Android Library Jar with gradle without publicly revealing source code?
> Gradle – Create a Jar file with dependencies

总结

以上是内存溢出为你收集整理的java-JOBB DirectoryFullException:de.waldheinz.fs.fat.DirectoryFullException:目录已满全部内容,希望文章能够帮你解决java-JOBB DirectoryFullException:de.waldheinz.fs.fat.DirectoryFullException:目录已满所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1093912.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存