deprecated thread methods are not supported

前端 未结 3 925
轻奢々
轻奢々 2020-12-06 15:35

I am making one project where i need to display Home page and when home page displays, after that or continue with that 3 to 5 seconds my other welcome custom dialog is disp

3条回答
  •  [愿得一人]
    2020-12-06 15:40

    This link tells you exactly what the problem is, and how to resolve it:

    What is this log, when I coded thread.stop()?

    Thread.stop is a deprecated API, and deprecated thread methods aren't supported in Android. Therefore it's throwing an UnsupportedOperationException.

    The answer is not to use Thread.stop - shut down your threads in a more graceful way, for example by setting a flag which the thread checks periodically.

    This link discusses why thread.stop() is deprecated (long ago deprecated in Java, not just Android!):

    http://docs.oracle.com/javase/1.4.2/docs/guide/misc/threadPrimitiveDeprecation.html

提交回复
热议问题