为什么我会得到这些"找不到课程"消息?

时间:2016-07-06 15:55:54

标签: android android-studio

当我运行我的应用时,无论是在设备上还是在模拟器上,我都会在Android Studio日志中收到一系列(红色)"Could not find class"消息。该应用程序运行正常。我的设置有什么问题?我使用gradle 2.1.0。

这是日志:

07-06 17:18:26.154 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.util.ArrayMap', referenced from method com.android.tools.fd.runtime.MonkeyPatcher.pruneResourceCache
07-06 17:18:26.224 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.UserHandle', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.254 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.274 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.315 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.UserHandle', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.315 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.345 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.365 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.UserHandle', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.405 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:26.415 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method info.myApp.main.SplashActivity.access$super
07-06 17:18:27.015 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.UserHandle', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.035 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.media.session.MediaController', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.075 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.app.ActivityManager$TaskDescription', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.125 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.UserHandle', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.125 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.185 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.app.SharedElementCallback', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.205 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.UserHandle', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.205 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.SearchEvent', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.205 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.os.PersistableBundle', referenced from method info.myApp.main.MainActivity.access$super
07-06 17:18:27.936 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.animation.StateListAnimator', referenced from method info.myApp.view.SquareFrameLayout.access$super
07-06 17:18:28.026 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.view.SquareFrameLayout.access$super
07-06 17:18:28.106 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.view.SquareFrameLayout.access$super
07-06 17:18:28.166 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.view.SquareFrameLayout.access$super
07-06 17:18:28.196 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.view.SquareFrameLayout.access$super
07-06 17:18:28.377 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewOutlineProvider', referenced from method info.myApp.pager.VerticalPager.access$super
07-06 17:18:28.387 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnApplyWindowInsetsListener', referenced from method info.myApp.pager.VerticalPager.access$super
07-06 17:18:28.477 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnContextClickListener', referenced from method info.myApp.pager.VerticalPager.access$super
07-06 17:18:28.527 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnScrollChangeListener', referenced from method info.myApp.pager.VerticalPager.access$super
07-06 17:18:28.567 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.pager.VerticalPager.access$super
07-06 17:18:28.587 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.pager.VerticalPager.access$super
07-06 17:18:28.817 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.animation.StateListAnimator', referenced from method info.myApp.pager.VerticalCirclePageIndicator.access$super
07-06 17:18:28.857 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.pager.VerticalCirclePageIndicator.access$super
07-06 17:18:28.877 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.pager.VerticalCirclePageIndicator.access$super
07-06 17:18:28.887 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.pager.VerticalCirclePageIndicator.access$super
07-06 17:18:28.897 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.pager.VerticalCirclePageIndicator.access$super
07-06 17:18:29.438 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewOutlineProvider', referenced from method info.myApp.view.DrawableView.access$super
07-06 17:18:29.468 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnApplyWindowInsetsListener', referenced from method info.myApp.view.DrawableView.access$super
07-06 17:18:29.528 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnContextClickListener', referenced from method info.myApp.view.DrawableView.access$super
07-06 17:18:29.578 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnScrollChangeListener', referenced from method info.myApp.view.DrawableView.access$super
07-06 17:18:29.608 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.view.DrawableView.access$super
07-06 17:18:29.648 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.view.DrawableView.access$super
07-06 17:18:31.059 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.animation.StateListAnimator', referenced from method info.myApp.view.Zoomable2BBoxMapView.access$super
07-06 17:18:31.149 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.view.Zoomable2BBoxMapView.access$super
07-06 17:18:31.179 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.view.Zoomable2BBoxMapView.access$super
07-06 17:18:31.199 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.view.Zoomable2BBoxMapView.access$super
07-06 17:18:31.219 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.view.Zoomable2BBoxMapView.access$super
07-06 17:18:31.890 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewOutlineProvider', referenced from method info.myApp.pager.HorizontalPager.access$super
07-06 17:18:31.910 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnApplyWindowInsetsListener', referenced from method info.myApp.pager.HorizontalPager.access$super
07-06 17:18:31.950 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnContextClickListener', referenced from method info.myApp.pager.HorizontalPager.access$super
07-06 17:18:32.120 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnScrollChangeListener', referenced from method info.myApp.pager.HorizontalPager.access$super
07-06 17:18:32.140 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.pager.HorizontalPager.access$super
07-06 17:18:32.270 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.pager.HorizontalPager.access$super
07-06 17:18:32.400 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.animation.StateListAnimator', referenced from method info.myApp.pager.HorizontalCirclePageIndicator.access$super
07-06 17:18:32.440 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.pager.HorizontalCirclePageIndicator.access$super
07-06 17:18:32.440 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.pager.HorizontalCirclePageIndicator.access$super
07-06 17:18:32.450 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.pager.HorizontalCirclePageIndicator.access$super
07-06 17:18:32.450 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.pager.HorizontalCirclePageIndicator.access$super
07-06 17:18:32.631 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewOutlineProvider', referenced from method info.myApp.view.StylableMediaController.access$super
07-06 17:18:32.641 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnApplyWindowInsetsListener', referenced from method info.myApp.view.StylableMediaController.access$super
07-06 17:18:32.691 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnContextClickListener', referenced from method info.myApp.view.StylableMediaController.access$super
07-06 17:18:32.731 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.View$OnScrollChangeListener', referenced from method info.myApp.view.StylableMediaController.access$super
07-06 17:18:32.781 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.ViewStructure', referenced from method info.myApp.view.StylableMediaController.access$super
07-06 17:18:32.811 32218-32218/info.myApp E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method info.myApp.view.StylableMediaController.access$super
07-06 17:18:51.980 32218-32758/info.myApp E/BellagioCore: ST Static Component Loader : Cannot open OpenMAX registry file /tmp/.omxregister

                                                                                     [ 07-06 17:18:51.980 32218:32758 D/         ]
07-06 17:18:55.173 32218-32758/info.myApp E/BellagioCore: ST Static Component Loader : Cannot open OpenMAX registry file /tmp/.omxregister

                                                                                     [ 07-06 17:18:55.173 32218:32758 D/         ]
                                                                                 In STEOMXCodecsPlugin:: GetpOMX_Init passed

1 个答案:

答案 0 :(得分:1)

您获得的日志是正常的。它们只代表从您的代码 有条件 引用的类。因此,它们是否存在并不重要。

找不到它们,因为它们不存在于您的设备或运行应用程序的模拟器上。

为什么它们不存在?因为它们是在较新的Android版本中引入的。

从日志中提取您的第一堂课,例如:

  

找不到类'android.util.ArrayMap'

ArrayMap是在API level 19中引入的,可能是你在旧版本上运行你的应用程序。

额外的东西:

由于应用程序运行正常,您可以忽略这些消息。由于缺少类而导致问题的唯一一次是当您尝试执行依赖于这些类的代码时。在这种情况下,例如对于ArrayMap,您可以使用android.support.v4.util.ArrayMap而不是常规android.util.ArrayMap