Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with androidx.appcompat:appcompat:1.1.0 #115

Open
DevNigam opened this issue Sep 25, 2019 · 11 comments
Open

Issue with androidx.appcompat:appcompat:1.1.0 #115

DevNigam opened this issue Sep 25, 2019 · 11 comments

Comments

@DevNigam
Copy link

https://stackoverflow.com/questions/41025200/android-view-inflateexception-error-inflating-class-android-webkit-webview

@soommy12
Copy link
Contributor

Hi @DevNigam ! Can you please explain further how this problem is connected to Highcharts Wrapper?

@DevNigam
Copy link
Author

Highchart wrapper is using native webview to display chart. And android webview is having crash with android lollipop devices.

Do let me know, if any.

@soommy12
Copy link
Contributor

Highcharts Wrapper was tested on many APIs, Lollipop included. We didn't meet a crash from WebView.

@DevNigam
Copy link
Author

DevNigam commented Sep 25, 2019

I have used androidx.appcompat:appcompat:1.1.0. So, if you don't mind, can you please check with specific to 21 and 22 version.

Here is the crash log :

Caused by android.content.res.Resources$NotFoundException: String resource ID #0x2040003
       at android.content.res.Resources.getText + 354(Resources.java:354)
       at android.content.res.Resources.getString + 452(Resources.java:452)
       at com.android.org.chromium.content.browser.ContentViewCore.setContainerView + 684(ContentViewCore.java:684)
       at com.android.org.chromium.content.browser.ContentViewCore.initialize + 608(ContentViewCore.java:608)
       at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore + 674(AwContents.java:674)
       at com.android.org.chromium.android_webview.AwContents.setNewAwContents + 823(AwContents.java:823)
       at com.android.org.chromium.android_webview.AwContents.<init> + 662(AwContents.java:662)
       at com.android.org.chromium.android_webview.AwContents.<init> + 597(AwContents.java:597)
       at com.android.webview.chromium.WebViewChromium.initForReal + 319(WebViewChromium.java:319)
       at com.android.webview.chromium.WebViewChromium.access$100 + 104(WebViewChromium.java:104)
       at com.android.webview.chromium.WebViewChromium$1.run + 271(WebViewChromium.java:271)
       at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue + 131(WebViewChromium.java:131)
       at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run + 118(WebViewChromium.java:118)
       at com.android.org.chromium.base.ThreadUtils.runOnUiThread + 144(ThreadUtils.java:144)
       at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask + 115(WebViewChromium.java:115)
       at com.android.webview.chromium.WebViewChromium.init + 268(WebViewChromium.java:268)
       at android.webkit.WebView.<init> + 591(WebView.java:591)
       at android.webkit.WebView.<init> + 526(WebView.java:526)
       at android.webkit.WebView.<init> + 509(WebView.java:509)
       at android.webkit.WebView.<init> + 496(WebView.java:496)
       at android.webkit.WebView.<init> + 486(WebView.java:486)
       at com.highsoft.highcharts.core.HIChartView.a + 137(HIChartView.java:137)
       at com.highsoft.highcharts.core.HIChartView.<init> + 116(HIChartView.java:116)
       at java.lang.reflect.Constructor.newInstance(Constructor.java)
       at java.lang.reflect.Constructor.newInstance + 288(Constructor.java:288)
       at android.view.LayoutInflater.createView + 607(LayoutInflater.java:607)
       at android.view.LayoutInflater.createViewFromTag + 743(LayoutInflater.java:743)
       at android.view.LayoutInflater.rInflate + 806(LayoutInflater.java:806)
       at android.view.LayoutInflater.rInflate + 809(LayoutInflater.java:809)
       at android.view.LayoutInflater.rInflate + 809(LayoutInflater.java:809)
       at android.view.LayoutInflater.rInflate + 809(LayoutInflater.java:809)
       at android.view.LayoutInflater.rInflate + 809(LayoutInflater.java:809)
       at android.view.LayoutInflater.rInflate + 809(LayoutInflater.java:809)
       at android.view.LayoutInflater.inflate + 504(LayoutInflater.java:504)
       at android.view.LayoutInflater.inflate + 414(LayoutInflater.java:414)
       at androidx.databinding.DataBindingUtil.inflate + 126(DataBindingUtil.java:126)
       at com.mrsportal.databinding.FragmentDashboardV3Binding.inflate + 130(FragmentDashboardV3Binding.java:130)
       at com.mrsportal.databinding.FragmentDashboardV3Binding.inflate + 124(FragmentDashboardV3Binding.java:124)
       at com.mrsportal.ui.fragment.DashboardV3Fragment.onCreateView + 79(DashboardV3Fragment.java:79)
       at androidx.fragment.app.Fragment.performCreateView + 2600(Fragment.java:2600)
       at androidx.fragment.app.FragmentManagerImpl.moveToState + 881(FragmentManagerImpl.java:881)
       at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState + 1238(FragmentManagerImpl.java:1238)
       at androidx.fragment.app.FragmentManagerImpl.moveToState + 1303(FragmentManagerImpl.java:1303)
       at androidx.fragment.app.BackStackRecord.executeOps + 439(BackStackRecord.java:439)
       at androidx.fragment.app.FragmentManagerImpl.executeOps + 2079(FragmentManagerImpl.java:2079)
       at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether + 1869(FragmentManagerImpl.java:1869)
       at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute + 1824(FragmentManagerImpl.java:1824)
       at androidx.fragment.app.FragmentManagerImpl.execPendingActions + 1727(FragmentManagerImpl.java:1727)
       at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange + 2663(FragmentManagerImpl.java:2663)
       at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated + 2613(FragmentManagerImpl.java:2613)
       at androidx.fragment.app.Fragment.performActivityCreated + 2624(Fragment.java:2624)
       at androidx.fragment.app.FragmentManagerImpl.moveToState + 904(FragmentManagerImpl.java:904)
       at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState + 1238(FragmentManagerImpl.java:1238)
       at androidx.fragment.app.FragmentManagerImpl.moveToState + 1303(FragmentManagerImpl.java:1303)
       at androidx.fragment.app.BackStackRecord.executeOps + 439(BackStackRecord.java:439)
       at androidx.fragment.app.FragmentManagerImpl.executeOps + 2079(FragmentManagerImpl.java:2079)
       at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether + 1869(FragmentManagerImpl.java:1869)
       at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute + 1824(FragmentManagerImpl.java:1824)
       at androidx.fragment.app.FragmentManagerImpl.execPendingActions + 1727(FragmentManagerImpl.java:1727)
       at androidx.fragment.app.FragmentManagerImpl$2.run + 150(FragmentManagerImpl.java:150)
       at android.os.Handler.handleCallback + 815(Handler.java:815)
       at android.os.Handler.dispatchMessage + 104(Handler.java:104)
       at android.os.Looper.loop + 194(Looper.java:194)
       at android.app.ActivityThread.main + 5637(ActivityThread.java:5637)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke + 372(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 960(ZygoteInit.java:960)
       at com.android.internal.os.ZygoteInit.main + 755(ZygoteInit.java:755)

@soommy12
Copy link
Contributor

soommy12 commented Sep 25, 2019

I just did tests both on API 21 and 22 (on emulators and real device). The Highcharts is working like a charm. The stack trace you posted says that some resources are missing. Maybe you are trying to use those missing resources in the Highcharts options and thats why it crashes.

@DevNigam
Copy link
Author

DevNigam commented Sep 25, 2019

Have you tried using androidx.appcompat:appcompat:1.1.0? Because I am able to check in higher devices and lower devices other than lollipop, I am not getting any crash.

@soommy12
Copy link
Contributor

soommy12 commented Sep 25, 2019

androidx.appcompat:appcompat:1.1.0 indeed causes a problem on Lollipop. Sounds like a WebView bug. I will investigate.

@DevNigam
Copy link
Author

I hope you can try this answer : https://stackoverflow.com/a/49024931

@soommy12
Copy link
Contributor

soommy12 commented Nov 13, 2019

@DevNigam did you try to update WebView on your device?

@soommy12
Copy link
Contributor

soommy12 commented Nov 13, 2019

This issue occurs on WebView 39 version only. Upgrading it via Google Play will fix the problem on the real device. When it comes to the emulator, well, there is no such option. Anyways, at this moment, the problem concerns a small group of emulators. Introducing a fix which changes how WebView is set via specific Configuration breaks some other WebView crucial behaviours so we won't take the risk to implement it. But we are constantly monitoring the problem looking for a fitting solution.

@lqlam
Copy link

lqlam commented Nov 23, 2019

This issue occurs on WebView 39 version only. Upgrading it via Google Play will fix the problem on the real device. When it comes to the emulator, well, there is no such option. Anyways, at this moment, the problem concerns a small group of emulators. Introducing a fix which changes how WebView is set via specific Configuration breaks some other WebView crucial behaviours so we won't take the risk to implement it. But we are constantly monitoring the problem looking for a fitting solution.

Yes, that's right. Problem by the system have installed com.android.webview 39.0.0, we need to remove this system app and replace with com.android.google.webview (eg 66.0.3359). I just try and FIXED on emulator with android 5.1. The tutorial is here: https://www.youtube.com/watch?v=b7jzc67O6qg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants