I upgraded android studio to lady bug then I upgraded android gradle plugin to the latest version 8.8.1 using the AGP upgrade assistant. I also changed the compile sdk to 35 and target sdk to 34. I was then able to compile and run my code with the dependency.