可能是依赖的一些问题 Failed execv(/system/bin/dex2oat

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34781711/article/details/80702141

gradle3.1.3 ,更新了许多依赖库版本,然后run直接崩溃。

06-15 10:21:30.221 23120-23120/? I/art: Late-enabling -Xcheck:jni
06-15 10:21:30.327 23120-23120/com.xx.xxx W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.xx.xxx-2/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.xx.xxx-2@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status

06-15 10:21:30.675 23120-23120/com.xx.xxx W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.xx.xxx-2/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.xx.xxx-2@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status

06-15 10:21:30.726 23120-23120/com.xx.xxx W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.xx.xxx-2/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.xx.xxx-2@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status

...

06-15 10:21:31.124 23120-23120/com.xx.xxx W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.xx.xxx-2/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.xx.xxx-2@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status

06-15 10:21:31.162 23120-23120/com.xx.xxx I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
06-15 10:21:31.164 23120-23120/com.xx.xxx I/InstantRun: starting instant run server: is main process
06-15 10:21:31.250 23120-23120/com.xx.xxx I/fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.xx.xxx/lib-main

06-15 10:21:31.434 23120-23120/com.xx.xxx W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
06-15 10:21:31.610 23120-23173/com.xx.xxx I/OpenGLRenderer: Initialized EGL, version 1.4
06-15 10:21:34.557 23120-23120/com.xx.xxx I/Process: Sending signal. PID: 23120 SIG: 9

首先分析一波异常,其中有这么几个比较有意思:

  1. Late-enabling -Xcheck:jni
    其他异常也会提示这个信息,所以这个可能关系不大。
  2. Failed execv(/system/bin/dex2oat --runtime-arg -classpath...) because non-0 exit status
    这个也只是说启动时log比较多,没提到崩溃的事。见下文。
  3. FirebaseInitProvider: FirebaseApp initialization unsuccessful
    这个是由于我引用了这个,这个是一直都有的,可能性也不大。
implementation 'com.google.android.gms:play-services-appindexing:9.8.0'
  1. InstantRun: starting instant run server: is main process
    参见:https://blog.csdn.net/nupt123456789/article/details/51828701
  2. Before Android 4.1, method android.graphics.PorterDuffColorFilter
    这个相似度挺高,据说是gradle里sdk版本的问题。
  3. OpenGLRenderer: Initialized EGL, version 1.4
  4. Process: Sending signal. PID: 28831 SIG: 9

2号异常:
经查:https://stackoverflow.com/questions/43250473/failed-execv-system-bin-dex2oat-in-android
大意:
当我进入这个活动时,我的手机需要加载很多东西(在我的LogCar中),我不知道它们是什么。我不知道它们是什么意思。有谁能解决这个问题吗?非常感谢你。
而我这边则是直接无法运行。
回答:
APK超过100个DEX文件。需要缩减项目。
另一个回答:
有两个要点与此有关,如果我看到你的build.gradle,它会更容易回答。通常情况下,你的应用程序会插入很多依赖项,但实际上并没有使用这些代码中的每一个代码,所以未使用的东西可以安全地删除。这里的答案是用Proguard缩小。
如果这仍然没有帮助,你需要Muldix将你的应用程序分割成多个输出文件。
这就是说,避免不惜一切代价使用Muldix:它减缓了构建过程,并在应用程序中引入了更多的复杂性。它的目的是为那些罕见的情况下,你只是没有任何其他选择。

但是目前还是没有解决办法。

猜你喜欢

转载自blog.csdn.net/qq_34781711/article/details/80702141