Android Studio,Error:Configuration with name 'default' not found.

来源:互联网 发布:ecjia到家源码 编辑:程序博客网 时间:2024/05/17 03:35
同一个project下面有多个module时,sync的时候发现总是提示:


Error:Configuration with name 'default' not found.


settings.gradle里面也都把几个module include进来了。

include ':Acadia_3G', ':Acadia_Brightness', ':pqaa_common_library'



这种error最后是这么解决的:

        发现pqaa_common_library module里面的内容已经被删了,而settings.gradle里面还把它include了。在project的根目录下settings.gradle里面删掉已经破坏的module---':pqaa_common_library'  即解决了该问题。


备注这里的':pqaa_common_library'是其它module的依赖module,它被破坏了,也产生了这个Error:Configuration with name 'default' not found.

dependencies {    compile fileTree(include: ['*.jar'], dir: 'libs')    compile 'com.android.support:appcompat-v7:23.4.0'    compile 'com.android.support:design:23.4.0'    compile project(':pqaa_common_library')}


完美解决该问题最好的方法是重新完整引入pqaa_common_library。


另外:如果是单纯的多出没有被依赖include module名,是没有这个错误的。

0 0