- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试在包含 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: 0
Slop: 189853 Directory Overhead: 24704
Partial Sector [32] writing to sector: 277
Partial Sector [32] writing to sector: 277
Partial Sector [32] writing to sector: 277
Partial Sector [299] writing to sector: 897
Partial Sector [416] writing to sector: 1733
Partial Sector [148] writing to sector: 2385
Partial Sector [95] writing to sector: 3013
Partial Sector [498] writing to sector: 3573
Partial Sector [146] writing to sector: 4061
Partial Sector [427] writing to sector: 4581
Partial Sector [204] writing to sector: 5213
Partial Sector [115] writing to sector: 5769
Partial Sector [69] writing to sector: 6481
Partial Sector [79] writing to sector: 7077
Partial Sector [346] writing to sector: 7661
Partial Sector [93] writing to sector: 8213
Partial Sector [120] writing to sector: 8857
Partial Sector [423] writing to sector: 9461
Partial Sector [4] writing to sector: 10149
Partial Sector [184] writing to sector: 11065
Partial Sector [479] writing to sector: 11921
Partial Sector [83] writing to sector: 12569
Partial Sector [358] writing to sector: 13241
Partial Sector [378] writing to sector: 14009
Partial Sector [366] writing to sector: 14669
Partial Sector [393] writing to sector: 15677
Partial Sector [323] writing to sector: 16385
Partial Sector [236] writing to sector: 16989
Partial Sector [233] writing to sector: 17645
Partial Sector [503] writing to sector: 18345
Partial Sector [348] writing to sector: 19017
Partial Sector [473] writing to sector: 19721
Partial Sector [192] writing to sector: 20345
Partial Sector [398] writing to sector: 20805
Partial Sector [67] writing to sector: 21617
Partial Sector [3] writing to sector: 22437
Partial Sector [315] writing to sector: 23489
Partial Sector [161] writing to sector: 24045
Partial Sector [421] writing to sector: 24569
Partial Sector [465] writing to sector: 25557
Partial Sector [164] writing to sector: 26485
Partial Sector [458] writing to sector: 27177
Partial Sector [412] writing to sector: 28153
Partial Sector [1] writing to sector: 28633
Partial Sector [119] writing to sector: 29441
Partial Sector [367] writing to sector: 30413
Partial Sector [274] writing to sector: 31397
Partial Sector [325] writing to sector: 32369
Partial Sector [355] writing to sector: 33361
Partial Sector [187] writing to sector: 34025
Partial Sector [136] writing to sector: 34829
Partial Sector [157] writing to sector: 35873
Partial Sector [175] writing to sector: 36733
Partial Sector [106] writing to sector: 37673
Partial Sector [79] writing to sector: 38593
Partial Sector [379] writing to sector: 39545
Partial Sector [296] writing to sector: 40517
Partial Sector [440] writing to sector: 41205
Partial Sector [277] writing to sector: 41985
Partial Sector [153] writing to sector: 42609
Partial Sector [484] writing to sector: 43385
Partial Sector [363] writing to sector: 44329
Partial Sector [510] writing to sector: 45097
Partial Sector [296] writing to sector: 46101
Partial Sector [314] writing to sector: 47081
Partial Sector [244] writing to sector: 48073
Partial Sector [187] writing to sector: 48825
Partial Sector [253] writing to sector: 49825
Partial Sector [374] writing to sector: 50833
Partial Sector [508] writing to sector: 51777
Partial Sector [26] writing to sector: 52517
Partial Sector [192] writing to sector: 53385
Partial Sector [137] writing to sector: 54209
Partial Sector [312] writing to sector: 55029
Partial Sector [145] writing to sector: 55829
Partial Sector [394] writing to sector: 56517
Partial Sector [150] writing to sector: 57317
Partial Sector [81] writing to sector: 58197
Partial Sector [198] writing to sector: 59101
Partial Sector [358] writing to sector: 59929
Partial Sector [397] writing to sector: 60729
Partial Sector [142] writing to sector: 61209
Partial Sector [148] writing to sector: 62193
Partial Sector [365] writing to sector: 62833
Partial Sector [93] writing to sector: 63293
Partial Sector [450] writing to sector: 63701
Partial Sector [10] writing to sector: 64485
Partial Sector [354] writing to sector: 64969
Partial Sector [174] writing to sector: 65441
Partial Sector [435] writing to sector: 65961
Partial Sector [64] writing to sector: 66553
Partial Sector [41] writing to sector: 67053
Partial Sector [463] writing to sector: 67489
Partial Sector [177] writing to sector: 68041
Partial Sector [403] writing to sector: 68509
Partial Sector [479] writing to sector: 69305
Partial Sector [248] writing to sector: 69761
Partial Sector [331] writing to sector: 70245
Partial Sector [361] writing to sector: 70745
Partial Sector [56] writing to sector: 71281
Partial Sector [301] writing to sector: 71805
Partial Sector [253] writing to sector: 72629
Partial Sector [461] writing to sector: 73041
Partial Sector [304] writing to sector: 73561
Partial Sector [218] writing to sector: 74105
Partial Sector [147] writing to sector: 74765
Partial Sector [303] writing to sector: 75365
Partial Sector [410] writing to sector: 76321
Partial Sector [280] writing to sector: 77137
Partial Sector [484] writing to sector: 77697
Partial Sector [344] writing to sector: 78465
Partial Sector [189] writing to sector: 79001
Partial Sector [126] writing to sector: 79413
Partial Sector [262] writing to sector: 79929
Partial Sector [187] writing to sector: 80317
Partial Sector [465] writing to sector: 80869
Partial Sector [350] writing to sector: 81313
Partial Sector [236] writing to sector: 81793
Partial Sector [98] writing to sector: 82333
Partial Sector [223] writing to sector: 83209
Partial Sector [1] writing to sector: 83593
Partial Sector [51] writing to sector: 84577
Partial Sector [340] writing to sector: 84993
Partial Sector [377] writing to sector: 85961
Partial Sector [232] writing to sector: 86829
Partial Sector [229] writing to sector: 87253
Partial Sector [337] writing to sector: 88225
Partial Sector [205] writing to sector: 89285
Partial Sector [353] writing to sector: 90089
Partial Sector [289] writing to sector: 90921
Partial Sector [369] writing to sector: 91969
Partial Sector [283] writing to sector: 92741
Partial Sector [267] writing to sector: 93553
Partial Sector [313] writing to sector: 94049
Partial Sector [363] writing to sector: 94521
Partial Sector [415] writing to sector: 95245
Partial Sector [181] writing to sector: 96269
Partial Sector [420] writing to sector: 96733
Partial Sector [251] writing to sector: 97733
Partial Sector [244] writing to sector: 98221
Partial Sector [406] writing to sector: 98669
Partial Sector [226] writing to sector: 99069
Partial Sector [363] writing to sector: 100045
Partial Sector [133] writing to sector: 100769
Partial Sector [461] writing to sector: 101209
Partial Sector [329] writing to sector: 102337
Partial Sector [495] writing to sector: 103201
Partial Sector [452] writing to sector: 104045
Partial Sector [97] writing to sector: 105153
Partial Sector [236] writing to sector: 106177
Partial Sector [10] writing to sector: 106645
Partial Sector [292] writing to sector: 107725
Partial Sector [36] writing to sector: 108725
Partial Sector [500] writing to sector: 109793
Partial Sector [441] writing to sector: 110681
Partial Sector [128] writing to sector: 111329
Partial Sector [293] writing to sector: 112277
Partial Sector [382] writing to sector: 112737
Partial Sector [493] writing to sector: 113229
Partial Sector [256] writing to sector: 113653
Partial Sector [20] writing to sector: 114893
Partial Sector [351] writing to sector: 115905
Partial Sector [110] writing to sector: 116913
Partial Sector [322] writing to sector: 118041
Partial Sector [156] writing to sector: 118589
Partial Sector [232] writing to sector: 119013
Partial Sector [331] writing to sector: 119533
Partial Sector [297] writing to sector: 120509
Partial Sector [310] writing to sector: 121549
Partial Sector [392] writing to sector: 122545
Partial Sector [285] writing to sector: 123485
Partial Sector [108] writing to sector: 124065
de.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$1.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$1.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 超出其最大大小 (512 MB)
异常从何而来? : DirectoryFullException.java
DirectoryFullException(int currentCapacity, int requestedCapacity) {
this("directory is full", currentCapacity, requestedCapacity);
}
对于这个问题,我想推荐一个解决方案和一些建议。希望对您有所帮助。
在 Windows 上:如果你有一个丢失图片的文件夹“data”,并复制到 android sdk-tools 目录
data/1.jpg
data/2.jpg
data/3.jpg
data/...
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.jpg
root/data/2.jpg
root/data/3.jpg
root/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 中读取,图片现在位于子文件夹中。
要检查 sector/cluster/FAT
大小,请运行 "jobb -v -dump [obb]"
。这将打印一堆信息,包括 "Sectors per cluster"
和 "Sectors per FAT"
。
在我的旧 .obb 中,这些值分别为 8 和 150。 8 不是 150 的因数,所以我可能遇到了上述内核错误。
您需要确保使用更新的 jobb.jar
和 fat32lib.jar
来修复该问题。使用 Google Drive 上当前版本的库,我现在每个集群有 8 个扇区,每个 FAT 有 184 个扇区。
我还没有验证这是否解决了我之前看到的数据损坏问题。我会做更多的测试并返回这里报告。
Hacking can solve the issue 。但是占用了更多内存:
这个问题确实开始非常非常无聊了。今天我想出了一个解决方法,这很荒谬,但看起来向 .obb 添加额外数据似乎可以解决问题(至少对我而言)。准确地说,我原来的 .obb 文件大小是 110MB,现在是 220MB,应用程序读取数据时没有损坏。到目前为止,这是我对应用程序做过的最肮脏的黑客攻击,我并不为此感到自豪,但是,嘿,至少现在可以用了。 :p
2015 年 10 月 19 日,他们发布了更新版本:android-sdk-fat32lib
此版本 fork 解决了从 (Android SDK 23)
开始随 Android SDK 分发的 JOBB 工具无法生成大于 512M 的 OBB 文件的问题。
您将在以下部分获得原始版本和修改版本的源代码:
源代码制作jar文件,您可以按照教程:
关于java - JOBB DirectoryFullException : de. waldheinz.fs.fat.DirectoryFullException: 目录已满,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37861753/
我正在编写一个具有以下签名的 Java 方法。 void Logger(Method method, Object[] args); 如果一个方法(例如 ABC() )调用此方法 Logger,它应该
我是 Java 新手。 我的问题是我的 Java 程序找不到我试图用作的图像文件一个 JButton。 (目前这段代码什么也没做,因为我只是得到了想要的外观第一的)。这是我的主课 代码: packag
好的,今天我在接受采访,我已经编写 Java 代码多年了。采访中说“Java 垃圾收集是一个棘手的问题,我有几个 friend 一直在努力弄清楚。你在这方面做得怎么样?”。她是想骗我吗?还是我的一生都
我的 friend 给了我一个谜语让我解开。它是这样的: There are 100 people. Each one of them, in his turn, does the following
如果我将使用 Java 5 代码的应用程序编译成字节码,生成的 .class 文件是否能够在 Java 1.4 下运行? 如果后者可以工作并且我正在尝试在我的 Java 1.4 应用程序中使用 Jav
有关于why Java doesn't support unsigned types的问题以及一些关于处理无符号类型的问题。我做了一些搜索,似乎 Scala 也不支持无符号数据类型。限制是Java和S
我只是想知道在一个 java 版本中生成的字节码是否可以在其他 java 版本上运行 最佳答案 通常,字节码无需修改即可在 较新 版本的 Java 上运行。它不会在旧版本上运行,除非您使用特殊参数 (
我有一个关于在命令提示符下执行 java 程序的基本问题。 在某些机器上我们需要指定 -cp 。 (类路径)同时执行java程序 (test为java文件名与.class文件存在于同一目录下) jav
我已经阅读 StackOverflow 有一段时间了,现在我才鼓起勇气提出问题。我今年 20 岁,目前在我的家乡(罗马尼亚克卢日-纳波卡)就读 IT 大学。足以介绍:D。 基本上,我有一家提供簿记应用
我有 public JSONObject parseXML(String xml) { JSONObject jsonObject = XML.toJSONObject(xml); r
我已经在 Java 中实现了带有动态类型的简单解释语言。不幸的是我遇到了以下问题。测试时如下代码: def main() { def ks = Map[[1, 2]].keySet()
一直提示输入 1 到 10 的数字 - 结果应将 st、rd、th 和 nd 添加到数字中。编写一个程序,提示用户输入 1 到 10 之间的任意整数,然后以序数形式显示该整数并附加后缀。 public
我有这个 DownloadFile.java 并按预期下载该文件: import java.io.*; import java.net.URL; public class DownloadFile {
我想在 GUI 上添加延迟。我放置了 2 个 for 循环,然后重新绘制了一个标签,但这 2 个 for 循环一个接一个地执行,并且标签被重新绘制到最后一个。 我能做什么? for(int i=0;
我正在对对象 Student 的列表项进行一些测试,但是我更喜欢在 java 类对象中创建硬编码列表,然后从那里提取数据,而不是连接到数据库并在结果集中选择记录。然而,自从我这样做以来已经很长时间了,
我知道对象创建分为三个部分: 声明 实例化 初始化 classA{} classB extends classA{} classA obj = new classB(1,1); 实例化 它必须使用
我有兴趣使用 GPRS 构建车辆跟踪系统。但是,我有一些问题要问以前做过此操作的人: GPRS 是最好的技术吗?人们意识到任何问题吗? 我计划使用 Java/Java EE - 有更好的技术吗? 如果
我可以通过递归方法反转数组,例如:数组={1,2,3,4,5} 数组结果={5,4,3,2,1}但我的结果是相同的数组,我不知道为什么,请帮助我。 public class Recursion { p
有这样的标准方式吗? 包括 Java源代码-测试代码- Ant 或 Maven联合单元持续集成(可能是巡航控制)ClearCase 版本控制工具部署到应用服务器 最后我希望有一个自动构建和集成环境。
我什至不知道这是否可能,我非常怀疑它是否可能,但如果可以,您能告诉我怎么做吗?我只是想知道如何从打印机打印一些文本。 有什么想法吗? 最佳答案 这里有更简单的事情。 import javax.swin
我是一名优秀的程序员,十分优秀!