hbb20 / hbb20/CountryCodePickerProject
Unable to add window -- token null is not valid; is your activity running?
- Ngôn ngữ chính
- Java
- Star
- 1.5k
- Fork
- 509
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
`Process: com.example.android, PID: 10996
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:907)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:387)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
at android.app.Dialog.show(Dialog.java:342)
at com.hbb20.CountryCodeDialog.openCountryCodeDialog(CountryCodeDialog.java:265)
at com.hbb20.CountryCodePicker.launchCountrySelectionDialog(CountryCodePicker.java:2207)
at com.hbb20.CountryCodePicker.launchCountrySelectionDialog(CountryCodePicker.java:2199)
at com.hbb20.CountryCodePicker$1.onClick(CountryCodePicker.java:147)
at android.view.View.performClick(View.java:7125)
at android.view.View.performClickInternal(View.java:7102)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27336)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)`
We are use ViewPager with custom view without fragment
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start with CountryCodeDialog.openCountryCodeDialog and the CountryCodePicker.launchCountrySelectionDialog call path shown in the stack trace. Reproduce the failure with the library used inside a ViewPager and a custom view without a fragment, then inspect how the dialog obtains its activity context. Done means country selection opens without the BadTokenException in that setup.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, java
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100