Android Studio点滴小结笔记

Creating Modules without copying files

解决方案

The module needs to have a Gradle build file set up for it. If it’s got that, then in the project you’re linking to it, add this to the settings.gradle file at the project root

include ':libraryName'
project(':libraryName').projectDir=new File('/path/to/library')

例如要把外部工程 volley 引入

include ':volley'
project(':volley').projectDir=new File('../volley')

参考

http://stackoverflow.com/questions/24658422/android-studio-0-8-1-creating-modules-without-copying-files

应用某个模块 (例如上一步的 volley)

修改要依赖 volley 的项目的 build.gradle 文件

修改 dependencies 为 (其中的 compileandroidTestCompile 为新增加的)

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
    androidTestCompile project(':volley')
    compile project(':volley')
}

删除模块

解决方案

  • 模块上 -> 右键 Open Module Settings -> 左侧选中相应模块 -> 点击左上角的 - 按钮

  • 磁盘上删除此模块

参考

http://stackoverflow.com/questions/16710290/how-to-delete-a-module-in-android-studio

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值