pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.07k stars 1.38k forks source link

java.lang.RuntimeException: Unable to start activity ComponentInfo #2148

Open ShumYHUAN opened 1 month ago

ShumYHUAN commented 1 month ago

Environment

Technology Version
Flutter version -
Plugin version -
Android version compile sdk 34
iOS version -
macOS version -
Xcode version -
Google Chrome version -

Device information:

Description

After I click the button, it shows error: E/AndroidRuntime: FATAL EXCEPTION: main

Expected behavior: I expect when the button is clicked it will go to the responsive page

Current behavior: It shows error and the app close after the button is clicked

Steps to reproduce

  1. This
  2. Than that
  3. Then

Images

Stacktrace/Logcat

FATAL EXCEPTION: main Process: com.example.mymaps, PID: 27044 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mymaps/com.example.mymaps.activities.PatientsLIstActivity}: android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class TextView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class TextView Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class TextView Caused by: android.content.res.Resources$NotFoundException: Drawable com.example.mymaps:drawable/radius with resource ID #0x7f08010b Caused by: android.content.res.Resources$NotFoundException: File res/drawable/radius.xml from drawable resource ID #0x7f08010b at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:847) at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:631) at android.content.res.Resources.loadDrawable(Resources.java:897) at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:955) at android.content.res.TypedArray.getDrawable(TypedArray.java:930) at android.view.View.(View.java:5010) at android.widget.TextView.(TextView.java:875) at android.widget.TextView.(TextView.java:869) at androidx.appcompat.widget.AppCompatTextView.(AppCompatTextView.java:113) at com.google.android.material.textview.MaterialTextView.(MaterialTextView.java:92) at com.google.android.material.textview.MaterialTextView.(MaterialTextView.java:87) at com.google.android.material.theme.MaterialComponentsViewInflater.createTextView(MaterialComponentsViewInflater.java:61) at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:148) at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1678) at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1729) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at com.example.mymaps.databinding.ActivityPatientsListBinding.inflate(ActivityPatientsListBinding.java:120) at com.example.mymaps.databinding.ActivityPatientsListBinding.inflate(ActivityPatientsListBinding.java:114) at com.example.mymaps.activities.PatientsLIstActivity.binding_delegate$lambda$0(PatientsLIstActivity.kt:20) at com.example.mymaps.activities.PatientsLIstActivity.$r8$lambda$xKgoPyP9xkEuPimQIrGrMDYxD4w(Unknown Source:0) at com.example.mymaps.activities.PatientsLIstActivity$$ExternalSyntheticLambda2.invoke(Unknown Source:2) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at com.example.mymaps.activities.PatientsLIstActivity.getBinding(PatientsLIstActivity.kt:20) 2024-05-23 06:28:31.415 27044-27044 AndroidRuntime com.example.mymaps E at com.example.mymaps.activities.PatientsLIstActivity.onCreate(PatientsLIstActivity.kt:29) at android.app.Activity.performCreate(Activity.java:7136) at android.app.Activity.performCreate(Activity.java:7127) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #8 tag requires 'angle' attribute to be a multiple of 45 at android.graphics.drawable.GradientDrawable.updateGradientDrawableGradient(GradientDrawable.java:1601) at android.graphics.drawable.GradientDrawable.inflateChildElements(GradientDrawable.java:1423) at android.graphics.drawable.GradientDrawable.inflate(GradientDrawable.java:1244) at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142) at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1332) at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1291) at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:833) ... 43 more 2024-05-23 06:28:31.428 27044-27044 Process com.example.mymaps I Sending signal. PID: 27044 SIG: 9 2024-05-23 06:28:31.488 2045-2158 InputDispatcher system_process E channel '2e5e487 com.example.mymaps/com.example.mymaps.activities.SinupForThreeActivity (server)' ~ Channel is unrecoverably broken and will be disposed!

github-actions[bot] commented 1 month ago

👋 @ShumYHUAN

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!