2016-09-14 96 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

回答