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.

java.lang.VerifyError after upgrading from 1.1.0-alpha06 to 1.1.0-alpha07

See original GitHub issue

After upgrading from com.google.android.material:material:1.1.0-alpha06 to com.google.android.material:material:1.1.0-alpha07, we are getting the following error. It happens in Android 4.3 and Android 4.4 so far.

java.lang.VerifyError: 
  at com.google.android.material.tabs.TabLayout.createTabFromPool (TabLayout.java:862)
  at com.google.android.material.tabs.TabLayout.newTab (TabLayout.java:852)
  at com.google.android.material.tabs.TabLayout.populateFromPagerAdapter (TabLayout.java:1474)
  at com.google.android.material.tabs.TabLayout.setPagerAdapter (TabLayout.java:1465)
  at com.google.android.material.tabs.TabLayout.setupWithViewPager (TabLayout.java:1378)
  at com.google.android.material.tabs.TabLayout.setupWithViewPager (TabLayout.java:1339)
  at com.google.android.material.tabs.TabLayout.setupWithViewPager (TabLayout.java:1319)
  at com.yocto.wenote.note.NoteFragment.initTabs (NoteFragment.java:343)
  at com.yocto.wenote.note.NoteFragment.lambda$onCreateView$1 (NoteFragment.java:199)

This is the code being called just before entering com.google.android.material.tabs.TabLayout

tabLayout.setupWithViewPager(viewPager);

It happens in line 862. (Left side is alpha07, right side is alpha06)

2019-06-15 01_31_14- app_build gradle  - File Compare

Any idea why such incident happens?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
yccheokcommented, Jun 14, 2019

We somehow workaround this problem by adding the following for R8

# VerifyError in Android 4
# https://github.com/material-components/material-components-android/issues/397
-keep class com.google.android.material.tabs.TabLayout$Tab {
*;
}

No crash so far. But, why this is required?

1reaction
HaydenCampbellcommented, Jul 11, 2019

Also receiving this error on Android 4.4, 4.1, 4.2, 4.3 and 5.01. Will try the workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Causes of getting a java.lang.VerifyError - Stack Overflow
java.lang.VerifyError can be the result when you have compiled against a different library than you are using at runtime. For example, this happened...
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