csdn_conda
打怪的小兵
采纳率33.3%
2018-04-03 10:00 阅读 2.3k

release 版本编译的时候odex 校验出错

5

你好!我在android 6.0的源码里面预置了一个自己的apk,release 版本编译得时候出现了odex 校验出错。报错信息如下:
dex2oatd I 27493 27493 art/runtime/gc/space/image_space.cc:701] SectionInternedStrings start=0x709d5158 size=244864 range=10309976-10554840
dex2oatd I 27493 27493 art/runtime/gc/space/image_space.cc:701] SectionImageBitmap start=0x70a11000 size=118784 range=10555392-10674176
dex2oatd I 27492 27492 art/dex2oat/dex2oat.cc:2083] out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --boot-image=out/target/product/itel_A12/dex_bootjars/system/framework/boot.art --dex-file=out/target/product/itel_A12/obj/APPS/HoloSpiralWallpaper_intermediates/oat/arm/package.odex.input --dex-location=/system/app/HoloSpiralWallpaper/HoloSpiralWallpaper.apk --oat-file=out/target/product/itel_A12/obj/APPS/HoloSpiralWallpaper_intermediates/oat/arm/package.odex --android-root=out/target/product/itel_A12/system --instruction-set=arm --instruction-set-variant=cortex-a7 --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-generate-debug-info --abort-on-hard-verifier-error --compile-pic
dex2oatd W 27450 27450 art/dex2oat/dex2oat.cc:1685] Failed to open .dex from file 'vendor/sprd/partner/prebuilt_apps/ItelWorkSpaceStyle.apk': Failed to open dex file '/system/app/ItelWorkSpaceStyle/ItelWorkSpaceStyle.apk' from memory: Unrecognized version number in /system/app/ItelWorkSpaceStyle/ItelWorkSpaceStyle.apk: 0 3 7
dex2oatd E 27450 27450 art/dex2oat/dex2oat.cc:1325] Failed to open some dex files: 1
dex2oatd I 27385 27385 art/dex2oat/dex2oat.cc:506] do not CompileUseInterpreterOnly, is_image= 0, dex_files.size()= 1
dex2oatd I 27385 27385 art/dex2oat/dex2oat.cc:1395] dex2oat, do not CompileUseInterpre
网上有提到过android N以上odex的magic version 增加了037, 所以这个低版本的无
法读取到高版本的,导致出错。
请问:1.android 版本和odex 的magic version 有什么联系吗?
2.出现这种情况下是取消odex优化,那还有其他方法避免吗?
谢谢~

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

相关推荐