NoSuchMethod错误
问题描述:
我的谷歌应用程序引擎服务器上运行:NoSuchMethod错误
- 的火力地堡联系SDK
- 谷歌云端点V2
更新到终点V2日前后(不确定,如果相关) ,我一直在服务器上收到此错误,而我的移动应用程序:
com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backend method
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;)V
at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:314)
at com.google.firebase.FirebaseApp.getOptions(FirebaseApp.java:260)
at com.google.firebase.auth.FirebaseAuth.<init>(FirebaseAuth.java:74)
at com.google.firebase.auth.FirebaseAuth.<init>(FirebaseAuth.java:61)
at com.google.firebase.auth.FirebaseAuth.<init>(FirebaseAuth.java:52)
at com.google.firebase.auth.FirebaseAuth$FirebaseAuthService.<init>(FirebaseAuth.java:316)
at com.google.firebase.auth.FirebaseAuth.getInstance(FirebaseAuth.java:98)
at com.google.firebase.auth.FirebaseAuth.getInstance(FirebaseAuth.java:85)
at com.project.apis.UserAPI.verifyUserIDToken(MyAPI.java:100)
Ca有人建议吗?其他报告建议更新我pom.xml
的番石榴依赖,但我不即使使用番石榴:
答
这时候有在classpath番石榴2个不兼容的版本发生。 Firebase使用一个版本(v20.0),Google App Engine库使用旧版本(我相信v18.0)。您可以使用mvn dependency:tree
命令检查依赖关系树,然后向旧版本添加排除规则。
的依赖关系树只列出番石榴一次(com.google.guava:番石榴:罐子:19.0:编译)。这可能是另一个问题吗? – user2181948
Firebase需要20.0。尝试将其添加到类路径,并删除19.0。 –
我现在使用20.0,但仍然得到相同的错误。 – user2181948