简体   繁体   English

将Android项目转换为Java项目

[英]Convert android project to java project

I've just finished developing an application for android. 我刚刚完成了针对Android的应用程序的开发。 I want to have a desktop version that is based on java, too. 我也想有一个基于Java的桌面版本。

I have to convert all layouts to swing and what other conflicts I may face, god knows. 上帝知道,我必须将所有布局转换为摆动以及可能遇到的其他冲突。

Is there a tool for converting android apps to jar standalone? 是否有用于将android应用转换为jar的工具? What is the easiest way to do this? 最简单的方法是什么?

There is no tool to do this, as Android and Normal Java apps are very different. 没有工具可以执行此操作,因为Android和普通Java应用程序非常不同。

The best you could do is move the non platform specific code into a library project, and reference it from both the Java and Android applications. 最好的办法是将非特定于平台的代码移到一个库项目中,并从Java和Android应用程序中引用它们。 So all code that doesn't use any import with android in it should be movable into the library, while all your swing/android specific code will go into the referencing projects. 因此,所有未在其中使用android导入的代码都应可移动到库中,而您所有swing / android特定的代码将进入引用项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM