0

ユーザーからの例外ログを調べていたところ、次の一般的な例外が見つかりました。

java.lang.IllegalArgumentException: parameter must be a descendant of this view
   at android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:2521)
   at android.view.FocusFinder.findNearestTouchable(FocusFinder.java:411)
   at android.view.ViewRoot.handleMessage(ViewRoot.java:1746)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:123)
   at android.app.ActivityThread.main(ActivityThread.java:4363)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:521)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
   at dalvik.system.NativeStart.main(Native Method)

この例外を適切に処理し、強制終了を防ぐ方法はありますか? 問題を再現できません。

Donut (1.5) の問題であるというこの Google スレッドが見つかり、修正されました。しかし、これは Android の新しいバージョンを使用しているユーザーから得ています。私の最小 API は 1.6 で、2.2 をターゲットにしています。

4

2 に答える 2

0

私の推測: offsetDescendantRectToMyCoords() が孫の座標を取得しようとしている可能性があります。つまり、探している子はビューグループの呼び出し元の直接の子孫ではありません。

于 2011-05-26T20:51:00.920 に答える