在 Android Studio 中导入模块 [英] Importing Module in Android Studio

查看:57
本文介绍了在 Android Studio 中导入模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Android Studio 中导入外部模块(名为 ViewPagerIndicator)?

解决方案

在 Android Studio 3.3 及更低版本中导入模块的步骤.

  1. 转到填充 >> >>导入模块...
  2. 选择要导入的模块的源目录,然后单击完成.
  3. 打开项目结构并打开项目的模块设置.
  4. 打开依赖项标签.
  5. 单击 (+) 图标并选择模块依赖项.选择模块并单击确定".
  6. 打开您的 build.gradle 文件并检查该模块现在是否在依赖项下列出.实现项目(路径:':ViewPagerIndicator')

<块引用>

在 Android Studio 3.4 及更高版本中导入模块的步骤(见附件图片).

  1. 转到文件 >> >>导入模块...
  2. 选择要导入的模块的源目录,然后单击完成.
  3. 打开项目结构对话框(您可以通过选择文件 > 项目结构来打开 PSD)并从左侧面板中单击依赖项.
  4. 模块(中间)部分选择要添加模块依赖项的模块.
  5. 点击声明的依赖项部分的 (+) 图标,然后点击模块依赖项.
  6. 选择模块并点击确定.
  7. 打开您的 build.gradle 文件并检查该模块现在是否列在依赖项下.实现项目(路径:':ViewPagerIndicator')

How can I import an external module (named ViewPagerIndicator) in Android Studio?

解决方案

Steps to import Module in Android Studio 3.3 and lower.

  1. Go to Fill >> New >> Import Module...
  2. Select the source directory of the Module you want to import and click Finish.
  3. Open Project Structure and open Module Settings for your project.
  4. Open the Dependencies tab.
  5. Click the (+) icon and select Module Dependency. Select the module and click Ok.
  6. Open your build.gradle file and check that the module is now listed under dependencies.implementation project(path: ':ViewPagerIndicator')

Steps to import Module in Android Studio 3.4 and higher (See attached image).

  1. Go to File >> New >> Import Module...
  2. Select the source directory of the Module you want to import and click Finish.
  3. Open Project Structure Dialog (You can open the PSD by selecting File > Project Structure) and from the left panel click on Dependencies.
  4. Select the module from the Module(Middle) section In which you want to add module dependency.
  5. Click the (+) icon from the Declared Dependencies section and click Module Dependency.
  6. Select the module and click Ok.
  7. Open your build.gradle file and check that the module is now listed under dependencies.implementation project(path: ':ViewPagerIndicator')

这篇关于在 Android Studio 中导入模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆