简体   繁体   English

将Eclipse中的现有源代码包含到Android Studio中

[英]Include existing source from Eclipse into Android Studio

I am trying to setup a project in Android Studio which includes several source files from an Eclipse project. 我正在尝试在Android Studio中设置一个项目,其中包括来自Eclipse项目的多个源文件。 The Eclipse project has the following structure: Eclipse项目具有以下结构:

  • Library Project 图书馆项目
  • It has a reference to several folders with java classes in them (included by link source) 它引用了其中包含Java类的几个文件夹(包含在链接源中)

Now I'd like to have these resources in my project/module in Android Studio too, but I can't find any possibility to achieve this other than copying them directly. 现在,我也想在Android Studio的项目/模块中也包含这些资源,但是除了直接复制它们之外,我找不到其他实现方法。 I'd like to avoid this because these files are part of a self written Java framework which is used in combination with GWT too. 我想避免这种情况,因为这些文件是自行编写的Java框架的一部分,该框架也与GWT结合使用。 So copying these files instead of linking them means all changes have to be done twice. 因此,复制这些文件而不是链接它们意味着所有更改必须进行两次。

Is it possible to include these sources similar to link source from Eclipse or is there another solution? 是否可以包含类似于来自Eclipse的链接源的这些源,或者还有其他解决方案?

You could build your Eclipse project and reference it as a library in Android studio project. 您可以构建Eclipse项目,并将其作为Android Studio项目中的库进行引用。 Then you would be able to access/use the required classes in the Android studio project. 然后,您将能够访问/使用Android Studio项目中的必需类。

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

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