简体   繁体   English

如何在Intellij Idea中添加库

[英]How to add a library in Intellij Idea

I recently switched from Eclipse to Intellij. 我最近从Eclipse切换到了Intellij。 Now I'm trying to use the andengine library. 现在我正在尝试使用andengine库。

In Eclipse it was easy to add libraries. 在Eclipse中,添加库很容易。 Just right click > properties > add library. 只需右键单击>属性>添加库。

In Intellij there is no option when you right click a folder (see image). 在Intellij中,右键单击文件夹时没有选项(见图)。 How can I add a project library (a folder, not a jar file) in Intellij? 如何在Intellij中添加项目库(文件夹,而不是jar文件)?

在此输入图像描述

Thank you.. 谢谢..

导航到File > Project Structure ,选择Modules ,然后点击加号按钮添加另一个文件夹(带源代码)。

Directly to the game engine to add to the project (intelliJ IDEA all versions); 直接将游戏引擎添加到项目中(intelliJ IDEA所有版本);

  1. Create new project or open existing project. 创建新项目或打开现有项目。
  2. Right click "Java" folder in the project explorer and create New -> Package. 右键单击项目资源管理器中的“Java”文件夹,然后创建New - > Package。
  3. Enter new package name: org.andengine 输入新包名:org.andengine
  4. Click to download the AndEngine 点击下载AndEngine

  5. Extract zip file and open AndEngine-GLES2 folder. 解压缩zip文件并打开AndEngine-GLES2文件夹。 Follow the path and copy the folder (src -> org -> copy andengine folder). 按照路径并复制文件夹(src - > org - > copy andengine文件夹)。

  6. Open your projects and follow the path. 打开您的项目并按照路径。 Your project module name -> src -> main -> java -> org -> andengine. 您的项目模块名称 - > src - > main - > java - > org - > andengine。 Paste it here... 粘贴在这里......

=> Open and check Android Studio. =>打开并检查Android Studio。 when you write will appear "import org." 当你写的时候会出现“import org”。 -> andegine. - > andegine。

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

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