I'm create some java 11 program (use maven) which using Appium for android testing and gRPC to communicate with other device.
Appium Dependency
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>8.3.0</version>
</dependency>
gRPC Dependency
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.53.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.53.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.53.0</version>
</dependency>
When I run the program, I got error
Warning: [org.testng.ITest] implementation on class [com.framework.DynamicTest] returned null. Defaulting to method name
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableMap.toImmutableMap(Ljava/util/function/Function;Ljava/util/function/Function;)Ljava/util/stream/Collector;
at io.appium.java_client.remote.AppiumNewSessionCommandPayload.makeW3CSafe(AppiumNewSessionCommandPayload.java:40)
at io.appium.java_client.remote.AppiumNewSessionCommandPayload.<init>(AppiumNewSessionCommandPayload.java:54)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:229)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:157)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:80)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:92)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:117)
The error occurs when I hit this line
mobileDriver = new AndroidDriver(new URL(strURL), capabilities);
It's look like the AndroidDriver not detected. But when I remove gRPC dependency, it's work.
Is there a possible solution to using io.appium together with io.grpc?