question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrading from 1.6.x to 2.1.0 is now throwing an inflation error

See original GitHub issue

While debugging, the inflator is throwing an exception at the buttonPast code in MaterialCalendarView:

    topbar = content.findViewById(R.id.header);
    buttonPast = content.findViewById(R.id.previous); <-- 
    title = content.findViewById(R.id.month_name);
    buttonFuture = content.findViewById(R.id.next);
    pager = new CalendarPager(getContext());

That immediately drops into the android’s LayoutInflator with an exception:

        } catch (Exception e) {
            final InflateException ie = new InflateException(
                    attrs.getPositionDescription() + ": Error inflating class "
                            + (clazz == null ? "<unknown>" : clazz.getName()), e);
            ie.setStackTrace(EMPTY_STACK_TRACE);
            throw ie;

The exception:

java.lang.NoSuchFieldError: No static field previous of type I in class Lcom/prolificinteractive/materialcalendarview/R$id; or its superclasses (declaration of 'com.prolificinteractive.materialcalendarview.R$id' appears in /data/app/xx/split_lib_slice_4_apk.apk)

The best I can tell is that there is another module using the id of ‘previous’ that is colliding with material-calendarview. I cannot find where that could be happening. Everything was working in 1.6.0.

Code diff: https://github.com/prolificinteractive/material-calendarview/compare/1.6.0...master

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
dryerflyercommented, Jun 3, 2019

I figured it out. There is a collision between this lib and https://github.com/Applandeo/Material-Calendar-View. We’re running both for different purposes. Any chance you could make your xml ids a bit more specific?

1reaction
dryerflyercommented, Jun 2, 2019

There seems to be a number of people experiencing this issue or at least are having inflation errors:. #955 #944 #942 #938

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inflation exception when using Java 8 dependency · Issue #944
UPDATE: Some time after posting this issue I found it is because ... Upgrading from 1.6.x to 2.1.0 is now throwing an inflation...
Read more >
Navigation | Android Developers
Navigation Safe Args has upgraded the Android Gradle Plugin ... patterns are now compiled lazily in NavDeepLink instead of during inflation.
Read more >
How to resolve compile errors during upgrade of Angular ...
I was able to fix the problem by upgrading some of the core dependencies manually like this: npm install --save @angular/animations@7 ...
Read more >
npm fails to install - Google Groups
Getting a rather long error when trying to run sudo npm install -g appium. The log file generated is as follows: 0 info...
Read more >
Bug: cannot instantiate RenderScript on [37056129]
Moto X 5.1.1. SM-N900 5.0 - Relevant code to trigger the issue. It crashes on the very first line of using Renderscript library:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found