JavaEar 专注于收集分享传播有价值的技术资料

Failed to open dex file, unrecognized version number

I've pushed an apk to system/priv-app on my tv box, but I get this error when I try to uninstall an app:

dex2oat : Failed to create oat file: /data/dalvik-cache/arm/system@priv-app@CanvasPackageInstaller@CanvasPackageInstaller.apk@classes.dex: Permission denied
dex2oat : dex2oat took 803.750us (threads: 4)
art     : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/ --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a9 --instruction-set-features=default --dex-file=/system/priv-app/CanvasPackageInstaller/CanvasPackageInstaller.apk --oat-file=/data/dalvik-cache/arm/system@priv-app@CanvasPackageInstaller@CanvasPackageInstaller.apk@classes.dex) because non-0 exit status
art     : Failed to open dex file '/system/priv-app/CanvasPackageInstaller/CanvasPackageInstaller.apk' from memory: Unrecognized version number in /system/priv-app/CanvasPackageInstaller/CanvasPackageInstaller.apk: 0 3 7 

I've tried to clean the dalvik-cache but with no success. What does it mean ?


  1. The 037 version of the dex format was introduced in the N timeframe. Devices with a version of Android older than N won't be able to read it.

  2. 参考答案2
  3. In my case problem was solved by enabling Instant Run. On each start of application there was prompt (Install Android 7 platform for instant run/Continue without instant run). When i press SKIP, there was same exception (dex version... bla-bla) for some apks. Installing appropriate platform dismissed exception.