Open snejokeee opened 5 years ago
I am still getting the error with TelegramBot Api 4.3 released 03 Jun 2019. I tried changing all guava 25.1 to 27.1 but still it did not work. @rubenlagus Can you please check asap?
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
at com.google.inject.TypeLiteral.getParameterTypes(TypeLiteral.java:278)
at com.google.inject.spi.InjectionPoint.forMember(InjectionPoint.java:115)
at com.google.inject.spi.InjectionPoint.
My changed files telegrambots-meta/pom.xml pom.xml.txt Bots.ipr.txt
Same prolem( Dependencies compile('org.telegram:telegrambots:4.8.1') compile group: 'com.google.guava', name: 'guava', version: '25.0-cuba.0'
When i use dependency like this:
I get this error:
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V at com.google.inject.TypeLiteral.getParameterTypes(TypeLiteral.java:278) at com.google.inject.spi.InjectionPoint.forMember(InjectionPoint.java:115) at com.google.inject.spi.InjectionPoint.<init>(InjectionPoint.java:82) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:274) at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:115) at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:706) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:930) at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:852) at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:291) at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:222) at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:938) at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:48) at com.google.inject.internal.ProcessedBindingData.runCreationListeners(ProcessedBindingData.java:60) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:133) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) at com.google.inject.Guice.createInjector(Guice.java:87) at com.google.inject.Guice.createInjector(Guice.java:69) at com.google.inject.Guice.createInjector(Guice.java:59) at org.telegram.telegrambots.meta.ApiContext.getInjector(ApiContext.java:46) at org.telegram.telegrambots.meta.ApiContext.getInstance(ApiContext.java:25)
I found 2 solutions:
And its works for me.