NoSuchMethodError: While integrating Firebase with app engine app

萝らか妹 提交于 2019-12-04 09:13:54

Include on project Guava newer version dependence.

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>22.0</version>
</dependency>

I also ran into this error and I never used Guava either. Funnily enough, my Glassfish server was using it's Guava version over the imported one! Run this code before the error to find out where your problematic Guava is coming from.

System.out.println(com.google.common.base.Preconditions.class.getProtectionDomain().getCodeSource().getLocation().toExternalForm());

Then download the most recent guava (currently Guava 22.0) and replace the old Guava file with the new one. This should fix your issue.

At this point, you should also be using the newer firebase version as well. I believe the developer also had the wrong Guava version in a previous firebase version.

        <dependency>
        <groupId>com.google.firebase</groupId>
        <artifactId>firebase-admin</artifactId>
        <version>5.2.0</version>
        </dependency>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!