Android Studio导入Module步骤

2018-03-28  本文已影响0人  小奇天

Android Studio导入Module(老司机忽略):
首先:File----New----Import Module



点进去之后选择要添加的module:

2.png

点击Finish
再到app下的build.gradle添加依赖:

这个冒号是必加的  vitamio是module name
implementation project(':vitamio')

如果使用

compile project(':vitamio')

会报:

Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018

意思是:

配置“compile”已经过时,已经用“implementation”替换了。
它将在2018年底被删除。

最后在settings.gradle添加module的名字:


6.png

如果app下的build.gradle依赖写错或者settings.gradle没添加会报错:

Project with path ':vitamio' could not be found in project ':app'.
上一篇 下一篇

猜你喜欢

热点阅读