简体   繁体   English

将模块导入Android Studio

[英]Import module to Android Studio

I'm tryin to import a Java module from Intellij IDEA to my Android Studio. 我正在尝试将Intellij IDEA中的Java模块导入到我的Android Studio中。 The module provides certain functionalliy for creating pdf documents. 该模块提供了用于创建pdf文档的某些功能。

Now, the Android Studio won't let me to import this module because it is built by Gradle. 现在,Android Studio不允许我导入此模块,因为它是由Gradle构建的。

I would like to know how can I integrate my module to my existing Android Studio project. 我想知道如何将我的模块集成到现有的Android Studio项目中。 Furthermore, I'd like to know what are those .iml files in the root directory of the project. 此外,我想知道项目根目录中的.iml文件是什么。

You could build the jar dependency from your module in IntelliJ IDEA and include this jar into the build.gradle dependencies. 您可以在IntelliJ IDEA中从模块构建jar依赖项,并将此jar包含在build.gradle依赖项中。 There is also another way to do it . 还有另一种方法可以做到这一点

.iml files represent module information. .iml文件表示模块信息。 Your module was of the Java type and Android Studio doesn't support plain Java modules, therefore there is no direct way to import it. 您的模块属于Java类型,而Android Studio不支持纯Java模块,因此无法直接导入它。

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

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