2016-09-14 95 views
1

形勢
我想使用Custom-Calendar-View libary我目前的項目。圖書館的源代碼在這裏:
https://github.com/npanigrahy/Custom-Calendar-View無法導入庫到Android Studio中手動

我可以把它導入如果我用搖籃導入庫:
compile 'com.github.npanigrahy:Custom-Calendar-View:v1.1'

  • 注意我用了1.1版。 Github上的README說使用1.0。在挖掘了http://stacktips.com/tutorials/android/custom-calendar-view-library-in-android後,我發現v1.1具有最新的更新並正確導入了庫。

不過,我試圖手動導入庫,所以我可以玩的樣本項目,以便更好地理解事情是如何工作的,因爲我最終需要叉和修改,以適應我的使用圖書館。

錯誤:
Configuration with name 'default' not found.

我的設置

. 
./app 
./app/build.gradle 
./libs 
./libs/Custom-Calendar-View 
./libs/Custom-Calendar-View/settings.gradle 
./settings.gradle 

我說什麼
1.Downloaded的定製日曆視圖拉鍊。解壓縮它。它複製到./libs

2.Added在./settings.gradle include ':app', ':libs:Custom-Calendar-View

3.Added在./app/build.gradle

dependencies { 
    compile project(':libs:Custom-Calendar-View')` 
} 

4,我試過Clean ProjectRebuild ProjectSync。目前沒有任何工作。

5.I甚至試圖git submodule initgit submodule update

  • 注意Custom-Calendar-View使用位於一個子模塊在Custom-Calendar-View/library

我的問題
1.Do我需要導入庫是能夠使用示例項目來玩玩嗎?如果我使用Gradle導入庫,我沒有在我的項目中看到它。

2.我真的不知道我做錯了什麼。我覺得所有這些鏈接都給出了相同的建議。

鏈接
Cannot change dependencies of configuration (after enabling instant run)

Configuration with name 'default' not found while building android project on gradle

Configuration with name 'default' not found. Android Studio

Error: Configuration with name 'default' not found in Android Studio

How to import a sample from a library on github into android studio

https://github.com/MagicMicky/FreemiumLibrary/wiki/Import-the-library-in-Android-Studio

回答