在我的团队中,我们使用ADT插件在Eclipse中开发了一个库。
我们有一个“大”演示应用程序和几个“迷你”应用程序使用库来测试不同的方面。将库和应用程序从Eclipse迁移到Android Studio
由于Android官方IDE现在是Android Studio和ADT插件似乎被放弃(last update on October '14),我们正在研究向Android Studio迁移。
在Eclipse上,我们可以在同一工作区内的磁盘中的不同位置加载项目。我们喜欢这个,因为这样我们可以将我们的库项目加载到演示中,并且还可以在引用项目库的同一工作区中加载临时项目。
我看到有two ways to migrate,但我觉得利弊两个:
Importing the Eclipse project directly into Studio
这个选项,但是:
这改变了所有项目的文件夹结构。它将eclipse项目复制到Android Studio项目文件夹中,这意味着要更改我们的内部存储库。
如果我们想添加一个时间项目来测试它与我们的库,我们需要导入它,所以它也将被复制到“主”库和演示旁边。
Exporting the Eclipse project from Eclipse as a Gradle project.
此选项保持文件夹结构,我们的Eclipse项目(#1以上),但#2的上面仍然有效这里,当我尝试从不同的位置导入一个项目,我也得到这个错误。
Error:FAILURE: Build failed with an exception. * What went wrong: Task 'compileDebugSources' not found in project ':TestMemCons'. * Try: Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
所以,我们可以移植到Android Studio中保持文件夹结构,使我们能够加载其他的Eclipse /的Android Studio项目在相同的情况下,使他们可以参考我们的图书馆项目?