-
Notifications
You must be signed in to change notification settings - Fork 154
App crashes first time using web view after setting a new language in the application. #114
Comments
I also get the same issue. Only for the first time. The library is very good. I could change any language on my app. But I got this issue. Hope you fix it soon. Ver 1.2.10 and Android 7.0 |
@akexorcist i'm facing same issue. App crashes for first time. |
@akexorcist I found the scenario. if I change locale after retuning a different locale from getDefaultLanguage(base: Context). (for very first time) |
any one have solution for this. The same issue here |
@Stupidman22 @huunhan18pro @CNdev16 I resolved this issue. You have to create a webview instance (programmatically) and destroy it. (just do it in on create). Not sure why it behaves like this. but it solved my problem. Crash happens only if you inflate a webview via XML (first instance). Please let me know if it resolves your issue. |
Thank you so much. I will apply it 😁
…On Sun, Jun 6, 2021, 22:44 nagesh-kashyap-r ***@***.***> wrote:
@Stupidman22 <https://github.com/Stupidman22> @huunhan18pro
<https://github.com/huunhan18pro> @CNdev16 <https://github.com/CNdev16> I
resolved this issue.
You have to create a webview instance (programmatically) and destroy it.
(just do it in on create).
Find the helper class in the below link.
https://github.com/YarikSOffice/lingver/blob/master/sample/src/main/java/com/yariksoffice/lingver/WebViewLocaleHelper.kt
Not sure why it behaves like this. but it solved my problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#114 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAGR55665YZZC7J44HLS6LTROJV5ANCNFSM45OXTLCQ>
.
|
The problem cause when using web view and override this function at application |
@Stupidman22 I solved the exact same issue by just creating an WebView() object. Like WebView(context).destroy() ->> in onCreate() of activity Did you try this? |
@nagesh-kashyap-r : In my case the webview is Native ads of google. It load in activity first time. I try to using your solution. But it FC. I think I did something wrong :( ... |
This issue was fixed in 1.2.11. Please check it out |
Since AndroidX AppCompat has per-app language preferences for backward compatibility. Please migrate this library to AndroidX for more stability, compatibility, and longer support from Google team. Thank you for your support |
App crashes first time using web view after setting a new language in the application.
แอพจะแครชกรณีใช้งาน webview ครั้งแรกหลังจาก start app -> set language in app ครับ
ref:
at android.webkit.WebViewDelegate.getPackageId(WebViewDelegate.java:164)
at xH.a(PG:16)
at xg.run(PG:14)
at java.lang.Thread.run(Thread.java:764)
The text was updated successfully, but these errors were encountered: