在Android应用程序使用Java RMI应用程序、Android、RMI、Java

2023-09-04 07:36:19 作者:青笺画卿颜/鸢语慕君年

我读过很多关于这个问题的线程,而我不能看到一个真实的解决方案吧。

I've read lots of threads about this issue, and i couldnt see a 'real' solution for it.

我做了一个Java项目 - 这是一个RMI服务器和我有一个Android应用程序,它假设是也是一个RMI客户端

I made a java project - which is a rmi server and i have an android application which suppose to be also a rmi client.

当我检查服务器是否工作我没有足够的智慧来测试客户端在Android项目,我做了一个测试客户端上一个简单的Java项目。

When i checked if the server works I wasn't wise enough to test the client on an android project and i made a test client on a simple java project.

现在,当我想要我的Andr​​oid应用程序连接到服务器我失败,因为Android项目不承认对于Java RMI包。

Now when i'm trying to connect my android application to server i fail because the android project doesn't recognize the java rmi package.

为什么这种情况发生?我该怎么办?

Why that happen? what should I do?

推荐答案

我有同样的问题,改变了我的沟通,socket通信!

I had the same problem and changed my communication to socket communication!

至于我能想出的java.rmi遗憾的是没有配备Android的,因此它无法使用它。

As far as I could figure out Java.rmi unfortunately does not come with Android and therefore it's not possible to use it.

但也有在这个帖子。