我目前正在开发一个应用程序,它应该向下兼容到API Level 23(Marshmallow)。不幸的是,即使使用自动生成的空活动并且项目中没有任何进一步的更改,Logcat也提到了许多警告。不要误会我的意思:该应用程序工作得很好但是我想尽快解决这些警告。
单独研究这些警告并没有任何效果,因为可用的答案通常是指源代码中的问题。由于我没有对自动生成的源代码进行任何更改,因此这些答案没有帮助。
其他尝试:
在所有情况下,Logcat都会提到以下警告:
棉花糖(API级别23)
09-03 16:27:08.793 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.847 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.856 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.864 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.874 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.883 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.893 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.902 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.911 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.921 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.930 4439-4439/com.example.test W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.example.test-1/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.example.test-1@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
09-03 16:27:08.933 4439-4439/com.example.test W/System: ClassLoader referenced unknown path: /data/app/com.example.test-1/lib/x86
09-03 16:27:08.999 4439-4439/com.example.test 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
09-03 16:27:09.201 4439-4494/com.example.test W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-03 16:27:09.273 4439-4439/com.example.test W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
牛轧糖(API等级25)
09-03 16:25:35.515 3268-3268/? W/art: Unexpected CPU variant for X86 using defaults: x86
09-03 16:25:35.598 3268-3268/com.example.test W/System: ClassLoader referenced unknown path: /data/app/com.example.test-1/lib/x86
09-03 16:25:35.793 3268-3268/com.example.test 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
09-03 16:25:36.069 3268-3333/com.example.test W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-03 16:25:36.138 3268-3268/com.example.test W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
奥利奥(API等级26)
09-03 16:23:18.671 6056-6056/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
09-03 16:23:19.045 6056-6089/com.example.test W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-03 16:23:21.491 6056-6056/com.example.test W/zygote: Current dex file has more than one class in it. Calling RetransformClasses on this class might fail if no transformations are applied to it!
问题
答案 0 :(得分:4)
这是一种众所周知的现象,还是我马上应对这些警告是正确的?
所有这些都应该被忽略。
您将如何处理这些警告?
忽略它们。
它们都不是来自您的Java代码。 Android框架和底层子系统在其日志消息中往往会产生不必要的骚扰。