如果我将com.google.truth.extensions:truth-proto-extension:1.1
jar 添加到我的 bazel 工作区,它似乎完全从 中删除类com.google.guava:guava:28.2-jre
,导致错误,例如
import static com.google.common.collect.ImmutableMap.toImmutableMap;
^
symbol: static toImmutableMap
location: class ImmutableMap
java/com/google/fhir/protogen/ProtoGenerator.java:316: error: cannot find symbol
.collect(toImmutableMap(def -> def.getId().getValue(), def -> def));
^
symbol: method toImmutableMap((def)->def[...]lue(),(def)->def)
location: class ProtoGenerator
你的文件说
One warning: Truth depends on the “Android” version of Guava, a subset of the “JRE” version.
If your project uses the JRE version, be aware that your build system might select the Android version instead.
If so, you may see “missing symbol” errors.
The easiest fix is usually to add a direct dependency on the newest JRE version of Guava.
这是否意味着除了 maven dep on 之外的任何东西com.google.guava:guava:28.2-jre
?如果没有,下一个最简单的解决方法是什么?