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

Cannot resolve symbol 'colorOnSecondary' #165

Open
PhantomLord72 opened this issue Apr 12, 2021 · 2 comments
Open

Cannot resolve symbol 'colorOnSecondary' #165

PhantomLord72 opened this issue Apr 12, 2021 · 2 comments

Comments

@PhantomLord72
Copy link

In UiUtils, master branch

@jksiezni
Copy link

I can confirm, there is a bug in the 3.3.0 version:

java.lang.NoSuchFieldError: No static field colorOnSecondary of type I in class Lcom/leinardi/android/speeddial/R$attr; or its superclasses (declaration of 'com.leinardi.android.speeddial.R$attr' appears in /data/app/~~lgg8kaX3XpAy2wwcLYjcGA==.apk!classes2.dex)
                                                                                                    	at com.leinardi.android.speeddial.UiUtils.getOnSecondaryColor(UiUtils.java:68)
                                                                                                    	at com.leinardi.android.speeddial.FabWithLabelView.setSpeedDialActionItem(FabWithLabelView.java:166)
                                                                                                    	at com.leinardi.android.speeddial.FabWithLabelView.init(FabWithLabelView.java:291)
                                                                                                    	at com.leinardi.android.speeddial.FabWithLabelView.<init>(FabWithLabelView.java:72)
                                                                                                    	at com.leinardi.android.speeddial.SpeedDialActionItem.createFabWithLabelView(SpeedDialActionItem.java:183)
                                                                                                    	at com.leinardi.android.speeddial.SpeedDialView.addActionItem(SpeedDialView.java:374)
                                                                                                    	at com.leinardi.android.speeddial.SpeedDialView.addActionItem(SpeedDialView.java:356)
                                                                                                    	at com.leinardi.android.speeddial.SpeedDialView.addActionItem(SpeedDialView.java:343)

The UiUtils class has a missing import for R class, probably this one com.google.android.material.R.attr.colorOnSecondary.

Why this error does not appear for all projects?

I suspect, this issue appears on projects with declared android.nonTransitiveRClass=true. If this library would also use non transitive R classes, then everything would work correctly.

@leinardi
Copy link
Owner

Hi @jksiezni, thank you for your comment, I haven't done any test but I feel you are probably right regarding the nonTransitiveRClass. Unfortunately this weekend I don't have much time, if anyone else wants to jump in with a PR, it would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants