美文网首页
androidstudio 手动添加lib

androidstudio 手动添加lib

作者: 风___________ | 来源:发表于2018-07-05 14:09 被阅读9次

一:操作

1. 打开文件所在的文件夹,讲lib放置在此处

3202851B-AA65-4E15-B06B-7DDB62D26464.png

2. 在setting.gradle 中添加引用

include ':app', ':numbercodeview-lib'

3. build.gradle(module:app) 中添加

# comment+enter 可以自动生成
    compile project(path: ':numbercodeview-lib')

4. build项目,然后就可以了

二:这个错误(没有自动化打包工具)

Error:Plugin with id 'com.github.dcendents.android-maven' not found. #341

解决方法:

// build.gradle(project) 添加
// 倒入开源项目需要添加下面自动打包的工具
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

相关文章

网友评论

      本文标题:androidstudio 手动添加lib

      本文链接:https://www.haomeiwen.com/subject/jhkpuftx.html