今天有朋友遇到编译micode patchrom时候出现如下错误信息,
unzipping target target-files…
Traceback (most recent call last):
File “/home/lzsmt/miui/tools/releasetools/ota_from_target_files”, line 889, in <module>
main(sys.argv[1:])
File “/home/lzsmt/miui/tools/releasetools/ota_from_target_files”, line 841, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File “/home/lzsmt/miui/tools/releasetools/common.py”, line 111, in LoadInfoDict
raise ValueError(“can’t find recovery API version in input target-files”)
ValueError: can’t find recovery API version in input target-files
于是乎看了下tools/releasetools/common.py文件,发现有定义内存默认需要4G,问了下朋友说他内存才2G,于是修改将下面的4096m改成2048m
便解决了这个错误信息。
cmd = [“java”, “-Xmx4096m”, “-jar”,
os.path.join(OPTIONS.search_path, “signapk.jar”)]
改成
cmd = [“java”, “-Xmx2048m”, “-jar”,
os.path.join(OPTIONS.search_path, “signapk.jar”)]
转载请注明来源:Cofface Blog » 解决编译遇到ValueError: can’t find recovery API version in input target-files问题