It is unlikely that you will be able to use RMI on Android. Even if you took the code for RMI from Apache Harmony or some other source, Android does not like projects attempting to load java.*
classes other than those that ship with the OS, and so will throw a compile error.
It is conceivable that you could use jarjar or simple refactoring to move all the RMI code into some other package (e.g., keshan.java.rmi
), but I have no idea how well that will work.
BTW, here are some more instructions on this process.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…