看板 AndroidDev 關於我們 聯絡資訊
我想要使用 這個 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' -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.229.62.228 ※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1544462177.A.685.html
zcbxvsdf: 放在project第一層就可以 12/11 09:18
zcbxvsdf: settings.gradle 加入 include 'MPChartLib' 12/11 09:19
zcbxvsdf: build.gradle 的dependencies 加入 12/11 09:21
zcbxvsdf: implementation project (':MPChartLib') 12/11 09:22
zcbxvsdf: 以上是你自己Download他的library的import方式 12/11 09:23
zcbxvsdf: 第二,你是要透過gradle下載的話 12/11 09:48
zcbxvsdf: http://i.imgur.com/3Z2YnxC.jpg 12/11 09:48
zcbxvsdf: 你maven url有加嗎?沒加找不到庫 12/11 09:49
t3825288: 謝謝解答!我是使用第一種方法,加入之後遇到這個問題 12/12 00:37
t3825288: More than one file was found with OS independent pat 12/12 00:37
t3825288: 'META-INF/proguard/androidx-annotations.pro' 12/12 00:38
t3825288: 後來在 build.gradle(app) 的 android {}中加入這行解決 12/12 00:39
t3825288: packagingOptions { exclude 'META-INF/proguard/androi 12/12 00:40
t3825288: dx-annotations.pro' } 12/12 00:40