补充一点,5.x Dex文件个不能数超过100个限制的问题
Opened this issue · 1 comments
tyzero commented
根据5.x 的源码知道, classses99.dex 之后都不加载
运行会出现 ClassDefnotFound的问题。
dex_files->push_back(dex_file.release());
size_t i = 2;
while (i < 100) {
--
| std::string name = StringPrintf("classes%zu.dex", i);
| std::string fake_location = location + kMultiDexSeparator + name;
| std::unique_ptr<const DexFile> next_dex_file(Open(zip_archive, name.c_str(), fake_location,
| error_msg, &error_code));
| if (next_dex_file.get() == nullptr) {
| if (error_code != ZipOpenErrorCode::kEntryNotFound) {
| LOG(WARNING) << error_msg;
| }
| break;
| } else {
| dex_files->push_back(next_dex_file.release());
| }
|
| i++;
| }
|
| return true;
| }
push_back 只执行了99次,文件里有classes100.dex的时候,这个就被丢掉了
别问我为什么知道,脸上带着淡然看破的微笑