同一个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名,是没有这个错误的。