使用VernacularVNC将我的Android应用程序连接到树莓时,我遇到了问题 在AndroidStudio中
public void onClick(View v) {
Thread thread2 = new Thread(new Runnable() {
public void run() {
try {
String host = "192.168.0.115";
int port = 5900;
config.setColorDepth(ColorDepth.BPP_24_TRUE);
config.setErrorListener(ex -> ex.printStackTrace());
config.setPasswordSupplier(()->"12345678");
client.start(host,port);
client.moveMouse(321,41);
Thread.sleep(10000);
client.stop();
} catch (Exception e) {
e.printStackTrace();
}
}
});
thread2.start();
}
});
日志
W/System.err: java.lang.ArrayIndexOutOfBoundsException: length=3; index=-126
at com.shinyhut.vernacular.protocol.messages.ServerSecurityTypes.decode(ServerSecurityTypes.java:37)
at com.shinyhut.vernacular.protocol.handshaking.SecurityTypeNegotiator.negotiate(SecurityTypeNegotiator.java:19)
at com.shinyhut.vernacular.protocol.handshaking.Handshaker.handshake(Handshaker.java:24)
at com.shinyhut.vernacular.client.VernacularClient.createSession(VernacularClient.java:167)
at ``com.shinyhut.vernacular.client.VernacularClient.start(VernacularClient.java:58)
at com.example.buhu.ssh2.MainActivity$2$1.run(MainActivity.java:83)
at java.lang.Thread.run(Thread.java:762)
我已尽力自行修复它,但出于构想,我只需要朝正确的方向推进,我将以某种方式进行管理。 我是这类事物的新手