[英]dex2oat Failing on Android 6/Marshmallow - Permission denied - Not instant run related
In our production build (done on a CI server, so no Instant Run), users are reporting that the app either: 在我们的生产构建中(在CI服务器上完成,因此没有即时运行),用户报告该应用程序:
or 要么
With several bug reports from them at this point, the common thread seems to be the dex2oat process failing: 有了他们的几个错误报告,共同的线程似乎是dex2oat进程失败:
dex2oat : /system/bin/dex2oat --compiler-filter=speed --dex-file=/data/app/**packagename**-1/base.apk --oat-file=/data/dalvik-cache/arm64/data@app@**packagename**-1@base.apk@classes.dex E dex2oat : Failed to create oat file: /data/dalvik-cache/arm64/data@app@**packagename**-1@base.apk@classes.dex: Permission denied 05-11 20:48:21.783 7316 7316 I dex2oat : dex2oat took 3.058ms (threads: 8) 05-11 20:48:21.793 7293 7293 W art : Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=speed --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/**packagename**-1/base.apk --oat-file=/data/dalvik-cache/arm64/data@app@**packagename**-1@base.apk@classes.dex) because non-0 exit status
We are seeing this issue across multiple manufacturers (Samsung, Kyocera, Blackberry) and phones. 我们在多个制造商(三星,京瓷,黑莓)和手机上看到了这个问题。 So far, all the bug reports that I have are against Android 6.0.X
到目前为止,我所有的错误报告都是针对Android 6.0.X的
I'm aware of Several Bugs with similar symptoms around Instant Run, but I do not believe this is that. 我知道几个 Bug在Instant Run周围有类似的症状,但我不相信这就是那个。 I've also seen a few other, older questions here, but only the Instant Run related ones have any answers or they are with much older versions of the plugins/gradle/build tools.
我在这里也看到了其他一些较旧的问题,但只有与Instant Run相关的问题有任何答案,或者它们与旧版本的插件/ gradle / build工具有关。
Comparing the last version we had before we started getting these reports to now, the only thing I think might be relevant is that I upgraded the Multidex library from 1.0.2
to 1.0.3
. 比较我们在开始获取这些报告之前的最新版本,我认为唯一可能相关的是我将Multidex库从
1.0.2
升级到1.0.3
。
Of course, I have been totally unable to reproduce the issue on any of my test devices, across any OS version, including factory resetting them. 当然,我完全无法在任何操作系统版本的任何测试设备上重现该问题,包括工厂重置它们。
Anyone have any thoughts, suggestions or even things to try? 任何人有任何想法,建议甚至尝试的事情? I'm running out of ideas quickly.
我很快就没有想法了。
Having finally gotten ahold of one of the devices where this problem is evident, some additional facts: 终于得到了其中一个显然存在问题的设备,还有一些额外的事实:
adb
as well adb
安装也会出现问题 debuggable true
causes the installation to go from 9:43 to less than 20 seconds. debuggable true
会导致安装从9:43到小于20秒。 This is true even if I leave other settings such as proguard and minification turned on. Looks like the Gradle Plugin 3.1.2 is causing the Issue 看起来像Gradle Plugin 3.1.2导致了问题
I was able to confirm that this is a bug in the android gradle plugin version 3.1.2.
我能够确认这是android gradle插件版本3.1.2中的一个错误。 By reverting to 3.0.1 I was able to compile identical code and have it dex2oat immediately and successfully.
通过恢复到3.0.1,我能够编译相同的代码并立即成功地使用dex2oat。 This issue is also present in the 3.2.0-alpha15 gradle plugin.
此问题也出现在3.2.0-alpha15 gradle插件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.