Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yccheok opened this issue Jun 14, 2019 · 10 comments
Closed

Comments

@yccheok
Copy link

yccheok commented Jun 14, 2019

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?

@yccheok
Copy link
Author

yccheok commented 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?

@cristh18
Copy link

We somehow workaround this problem by adding the following for R8

Hi @yccheok how are you? I have this issue on my app but I have not could reproduce it.

Screen Shot 2019-06-30 at 12 58 42 PM

I think that is the same issue that you had. Would you think that your solution work for me?

@yccheok
Copy link
Author

yccheok commented Jun 30, 2019

Yes. I can easily reproduce the problem using Android 4. I believe you can "workaround" the problem, with the method I mentioned above.

@cristh18
Copy link

@yccheok Thank you so much... I'll do tests with your solution. I'll hope that works.

@yccheok
Copy link
Author

yccheok commented Jun 30, 2019

Your crash analysis looks interesting. May I know is that a paid service?

@cristh18
Copy link

@yccheok I use https://fabric.io/home and is free

@ItzNotABug
Copy link

ItzNotABug commented Jul 8, 2019

facing the same issue..
I also tried @yccheok's solution, still getting crashes on 4.x devices

Edit: Its working, I forgot to specify the proguard file in build.gradle

@HaydenCampbell
Copy link

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

@xDragonZ
Copy link

xDragonZ commented Aug 6, 2019

this error occur on API 18 and 19 with alpha07, alpha08 and alpha09

fixed by adding, TabLayout$Tab to proguard

@drchen
Copy link
Contributor

drchen commented Jul 15, 2021

I'm going to close this issue since it seems something beyond our control and we have a known workaround.

@drchen drchen closed this as completed Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants