首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带有空活动的新项目会导致警告

带有空活动的新项目会导致警告
EN

Stack Overflow用户
提问于 2017-09-03 17:14:11
回答 1查看 954关注 0票数 1

我目前正在开发一个应用程序,它应该向后兼容到API级别23 (Marshmallow)。不幸的是,即使使用自动生成的空活动,并且没有对项目进行任何进一步的更改,Logcat也提到了许多警告。不要误解我的意思:这个应用程序运行得很好,但是我还是想尽快处理这些警告。

单独研究这些警告不会产生任何效果,因为可用的答案通常是指源代码中的问题。由于我没有对自动生成的源代码做任何修改,这些答案没有帮助。

其他尝试:

  • 重新启动应用程序
  • 重新启动模拟器
  • 清除数据
  • 清除缓存
  • 更改仿真器(与Nexus 10、Nexus 5X和自定义仿真器相同)
  • 在最新的AndroidStudio3.0Beta 4中创建项目
  • 在连接的设备上运行应用程序

在所有情况下,Logcat都提到以下警告:

Marshmallow (API级23)

代码语言:javascript
复制
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)

代码语言:javascript
复制
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

Oreo (API级别26)

代码语言:javascript
复制
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!

问题

  1. 这是一种已知的现象,还是我应该立即处理这些警告呢?
  2. 由于我已经回顾了IDE的设置、构建过程和模拟器本身,我已经没有任何想法了。您将如何处理这些警告?
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-09-03 17:21:33

这是一种已知的现象,还是我应该立即处理这些警告呢?

所有这些都应该被忽视。

您将如何处理这些警告?

无视他们。

它们都不是来自您的Java代码。Android框架和底层子系统在日志消息中往往不必要地喋喋不休。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46025975

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档