Android crash when displaying a custom marker info window using markerInfoContents
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 92/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- android, typescript
- 領域
- mobile-dev
調査の方向性
packages/google-maps/index.android.ts の、info.view を GridLayout に追加する markerInfoContents の処理から始めます。返される native view が wrapper container であることを確認し、その後、marker を繰り返し開いて再現し、custom information windows が Android で already-parented-child crash を引き起こさなくなったことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Android crash when displaying a custom marker info window using markerInfoContents
Using markerInfoContents to display a custom NativeScript view causes Android to crash on API 36, API 37, and a physical Android device.
Error
java.lang.IllegalStateException:
The specified child already has a parent.
You must call removeView() on the child's parent first.
Cause
In packages/google-maps/index.android.ts, the plugin adds info.view to a GridLayout container but returns the child:
container.addChild(info.view)
return info.view.nativeView
Because the returned child already belongs to the container, Google Maps attempts to attach an already-parented view.
Suggested fix
Return the wrapper container instead:
return container.nativeView
The custom information-window view should display without crashing when repeatedly opening markers.
- 主要言語
- TypeScript
- スター
- 206
- フォーク
- 123
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/plugins のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NativeScript/plugins#671 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
NativeScript/plugins#640 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NativeScript/plugins#668 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NativeScript/plugins#665 · コメント 1 件 ·
-
NativeScript/plugins#660 · リアクション 1 件 · 担当者 2 名 ·
NativeScript/plugins の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100