Android crash when displaying a custom marker info window using markerInfoContents
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 92/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, typescript
- Lĩnh vực
- mobile-dev
Hướng nghiên cứu
Bắt đầu trong packages/google-maps/index.android.ts, tại phần xử lý markerInfoContents thêm info.view vào một GridLayout. Xác minh rằng native view được trả về là wrapper container, sau đó tái hiện bằng cách mở các marker liên tục và xác nhận rằng các custom information window không còn gây ra already-parented-child crash trên Android.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 206
- Fork
- 123
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/plugins
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NativeScript/plugins#671 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
NativeScript/plugins#640 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
NativeScript/plugins#668 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
NativeScript/plugins#665 · 1 bình luận ·
-
NativeScript/plugins#660 · 1 reaction · 2 người được giao ·
Tất cả issue của NativeScript/plugins
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Đang mởbug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Client support matrix inclusion Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
calcite-components needs triage refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Esri/calcite-design-system#15203 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
danielmiessler/LifeOS#2218 ·