I have an app that's been running for years, and suddenly it has started crashing (With new builds).
My findings is that after you have visited a page with a webview the app will crash. Not on the page with the webview but after you left that page.
I get this exception
Android.Views.InflateException: Binary XML file line #1 in se.xx.yy:layout/shellcontent: Binary XML file line #1 in se.xx.yy
Can also see this in the stack trace:
at Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 37: TypedValue{t=0x2/d=0x7f030007 a=13}, theme={InheritanceMap=[id=0x7f10020bse.xx.yy:style/ThemeOverlay.AppCompat.Dark.ActionBar, id=0x7f10006cse.xx.yy:style/Base.ThemeOverlay.AppCompat.Dark.ActionBar, id=0x7f10006bse.xx.yy:style/Base.ThemeOverlay.AppCompat.Dark, id=0x7f10010ase.xx.yy:style/Platform.ThemeOverlay.AppCompat.Dark
Any advice?
/Lars
Related
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.
I am trying to play this video ID I1iEFV1ZWHg on YouTubePlayerView using Youtube sample application
I noticed that this video starts with promoted ad that requires custom toast,
this the crash message:
Fatal Exception: android.view.InflateException Binary XML file line
3: Error inflating class com.google.android.libraries.youtube.common.ui.YouTubeTextView
android.view.LayoutInflater.createViewFromTag
Caused by java.lang.ClassNotFoundException Didn't find class
"com.google.android.libraries.youtube.common.ui.YouTubeTextView" on
path:
I'm getting an unhandled exception when I try to access the hamburger menu on my Android simulator. The exception is:
Unhandled Exception: Android.Views.InflateException: Binary XML file line #14: android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.ImageView occurred
It was working until very recently, but reverting all my code changes today doesn't fix the problem. I don't think the problem is with my code.
I don't know what I did to cause this, but I was playing around with different Navigation types when the problem came up. Couldn't find relevant information about the error online.
I have two custom components, one which I made quite recently, both in Android Studio. The earlier one worked. I followed the same procedure to make the new one but it throws runtime errors when I reach the activity screen during testing.
These are the exception messages, listed in order:
1. java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sentient/com.mycompany.MyActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class <unknown>
2. Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class <unknown>
3. java.lang.reflect.InvocationTargetException
4. java.lang.NoClassDefFoundError: com.mycomponent.R$color
Error #4 shows the actual line itself that throws the error, it is part of the constructor of the component:
int color = res.getColor(R.color.progress_gray);
I checked the R file manually, and found the colors (progress_gray is defined in the colors.xml) to be present. I removed the line, and another line throws the error instead (which again depends on the R file to get information).
I have tried cleaning, changing build order in gradle, Make the component separately, and I still can't figure out where the mistake is. Any help is appreciated! Thanks.
can you post the xml file of the custom view?
Check if you have added to your main layout of the custom view xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
I got the solution. The applicationId in build.gradle and the package in the manifest were not matching. Once I changed it, it worked.
Strange though, I had thought that the reason the two were separated was so that they could be named differently. In any case, that was what got it working.
i am running a list-fragment program and at run-time i got the below error.
Error:
**02-09 09:03:40.213: ERROR/AndroidRuntime(572): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{ni.android.Fragment/ni.android.Fragment.Fragment}: java.lang.ClassNotFoundException: ni.android.Fragment.Fragment in loader dalvik.system.PathClassLoader[/data/app/ni.android.Fragment-1.apk]**
I don't know the reason.My program contains three classes- DetailsFragment.java, FragmentsTitles.java and Shakespear.java can any one help me out please....
At any time if you get an error stating Unable to instantiate activity ComponentInfo
That means your code has some error.
That error will be shown in log cat As Caused by:.........
1.Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class fragment(This indicates that there is an error in xml and the activity has inflating problem.
By this you can know what is the error and if you rectify that error then your problem will be solved.
This blog will solve this issue.
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17
Thanks
I had this error as well (beginner) and I noticed that I forgot to create the onCreate method in my activity class. Once I created that, the error went away.
If you have like this warning before error:
05-16 10:08:00.033: W/dalvikvm(1695): Unable to resolve superclass of Lmy/fragment/test/FragmentTestActivity; (7)
05-16 10:08:00.076: W/dalvikvm(1695): Link of class 'Lmy/fragment/test/FragmentTestActivity;' failed
Should export android-support-v4 to right to your app:
Configure Java Build Path -> Order And Export tab -> set checkbox android-support-v4.jar
(Maybe need to remove existing one firstly)
Make sure you are not only looking at error logcat ... as the error may be seen using verbose. But I agree with #parameshwar-s