Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey,
I've been trying to add BottomNavigationView to my Activity but I've got a rendering problem which says "failed to find style 'bottomnavigationstyle' in current theme".

I've added this dependency (didn't throw any error, so I'm assuming it exits)
implementation 'com.android.support:design:28.0.0'

Can anyone help me out with this? Thanks.

What I have tried:

I googled about this error and I read that I've add this
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout
and It's still not working.
Posted
Updated 19-Oct-18 4:19am

Apparently this is a bug in 28.0.0- see java - Theme Error - how to fix?[^] Reproducing that solution here ...
Add the following to your build.gradle which forces it to use 27.0.0
configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == "com.android.support") {
                if (!requested.name.startsWith("multidex")) {
                    details.useVersion "27.1.1"
                }
            }
        }
    }
 
Share this answer
 
I had to upgrade my Gradle. That was the problem.
 
Share this answer
 
Comments
CHill60 19-Oct-18 10:57am    
Which is what I said in my solution
CHill60 19-Oct-18 10:58am    
At the very least improve your solution with what you actually put into your gradle so if anyone else has the problem they can fix it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900