android 8.0 user-defined view Application Crash - android

When I use my application in Android 8.0, it crashes. Here is the log:
android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class com.**.**.XListView
android.view.InflateException: Binary XML file line #7: Error inflating class com.****
java.lang.ClassNotFoundException: Can't find class com.****. installed bundles
The *** was hidden by me.
XListView is a user-defined view that extends ListView.
But when I use the application on a lower version, like Android 7.1, 7.0, 6.0, 5.0... it works normally.
What can I do to resolve it?

Related

Is there a limitation in length of TextView

I'm developing Android App and I'amm putting some strings that reach 20,653Bytes in TextView.
When I build and execute on API 22 device, it works. However, When building on API 26 device, IndexOutOfBoundsException error occured like below.
Caused by: android.view.InflateException: Binary XML file line #61: Binary XML file line #61: Error inflating class TextView
Caused by: android.view.InflateException: Binary XML file line #61: Error inflating class TextView
Caused by: java.lang.IndexOutOfBoundsException
How to solve this error? I have to display this text at at time.
I just solved like below.
Save text(formed in html) in String variable, and then,
tvContent.setText(Html.fromHtml(html1));
When I just used strings.xml, it didn't work.

AsyncLayoutInflater with Webview

I was trying to use AsyncLayoutInflater with WebView, but inflation failed on the background thread:
Failed to inflate resource in the background! Retrying on the UI thread
android.view.InflateException: Binary XML file line #6: Binary XML file line #6: Error inflating class android.webkit.WebView
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class android.webkit.WebView
I assume this means that WebView cannot be inflated asynchronously because it makes use of Handler internally, at least using AsyncLayoutInflater.
Is there any way around this?

Android: Error inflating class android.support.v4.widget.DrawerLayout

I am getting "android.view.InflateException: Binary XML file line #9: Error inflating class android.support.v4.widget.DrawerLayout" while i using "android.support.v4.widget.DrawerLayout" in my layout.
When my application goes to background and I open chrome, after that I press home button and open the application from recent. That time I am getting this error.
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class android.support.v4.widget.DrawerLayout
In gradle I have added below dependencies:
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
This happens only when the google chrome opened. I tested by opening other app and then relaunching my app from recent. That time I'm not getting any crash.

android.view.InflateException:Binary XML file line #18:Error inflating class android.support.design.widget.NavigationView

java.lang.RuntimeException: Unable to start activity ComponentInfo{cab.app.book/com.epbit.ccv3.MainActivity}: android.view.InflateException: Binary XML file line #18: Error inflating class android
support.design.widget.NavigationView.
Added design and appcompat library and Tried in all the ways, but unable to solve the issue.
Please help
Your layout's file has an error in line 18.

Android Studio error "android.view.InflateException: Binary XML file line #26: Error inflating class " when trying to use GeckoView

So, I'm trying to use GeckoView in my Android app. When I run my app I get this error:
"Process: com.example.planetarium_3d, PID: 1586
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.example.planetarium_3d/com.example.planetarium_3d.Fullscree nActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class org.mozilla.gecko.GeckoView"
I've placed the .jar files in my libs folder - !http://i.imgur.com/kSFwHzd.png?1
This is my code: http://pastebin.com/kGCjfuAC
This is my activity xml file: http://pastebin.com/s8GYnucS
And this is error log: http://pastebin.com/2yXR6imZ
How can I resolve this issue ?
Exception:
android.view.InflateException: Binary XML file line #26: Error
inflating class org.mozilla.gecko.GeckoView"
Inside your Activity xml file, you dont need class = "org.mozilla.gecko":
<org.mozilla.gecko.GeckoView
android:id="#+id/geckoViewObj"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>

Categories

Resources