[问题] import github project 到自己的project

楼主: t3825288 (猩爷可以了)   2018-12-11 01:16:11
我想要使用 这个 github的project
https://github.com/PhilJay/MPAndroidChart/
参造他所提供的 MPChartExample 来写code
但是里面会使用到 MPChartLib 的一些 function
请问我要怎么把这个 folder import 到我的 project
我使用的是 Android Studio 平台开发
看这的解答是要在 app/build.grade 加入
https://github.com/PhilJay/MPAndroidChart/issues/26
但是会出现
Project with path ':MPChartLib' could not be found in project ':app'.
请问需要把 MPChartLib这个folder放到哪个目录下呢
这个 lib 没有办法像下面这样写就可以从网站上download下来吗
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
作者: zcbxvsdf (东北一头羊)   2018-12-11 09:18:00
放在project第一层就可以settings.gradle 加入 include 'MPChartLib'build.gradle 的dependencies 加入implementation project (':MPChartLib')以上是你自己Download他的library的import方式第二,你是要透过gradle下载的话http://i.imgur.com/3Z2YnxC.jpg你maven url有加吗?没加找不到库
楼主: t3825288 (猩爷可以了)   2018-12-12 00:37:00
谢谢解答!我是使用第一种方法,加入之后遇到这个问题More than one file was found with OS independent pat'META-INF/proguard/androidx-annotations.pro'后来在 build.gradle(app) 的 android {}中加入这行解决packagingOptions { exclude 'META-INF/proguard/androidx-annotations.pro' }

Links booklink

Contact Us: admin [ a t ] ucptt.com