NoSuchMethod error getting a gdata service

前端 未结 8 864
时光说笑
时光说笑 2020-12-09 14:06

I get the following error:

Exception in thread \"main\" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)Lcom/googl         


        
8条回答
  •  鱼传尺愫
    2020-12-09 14:42

    Adding more than required may cause issue too. java.lang.NoSuchMethodError error typically happens in case where runtime couldn't find required method with exact signature. Possible causes are:

    1) There might be mulitple jars with same code, which may cause wrong class get loaded.
    
    2) Incompatable version of jar, the jar you have in classpath might be older version/newer version.
    

    Make sure none of those cases happening.

提交回复
热议问题