newInstance failed: no

后端 未结 1 1021
我寻月下人不归
我寻月下人不归 2020-12-06 17:36

I cannot instantiate a sub activity. In the logcat I see this line:

01-22 15:14:38.906: DEBUG/dalvikvm(411): newInstance failed: no ()


        
相关标签:
1条回答
  • 2020-12-06 18:21

    dalvikvm's looking for a zero-argument constructor (that's what they mean by "nullary", as in "binary" for 2 arguments, "unary" for 1 argument, it's "nullary" for 0 arguments).

    in the snippet you've shown, you only have a three-argument constructor. that's no good: you'll be instantiated with no arguments, so you need a zero-argument constructor.

    0 讨论(0)
提交回复
热议问题