Configuration with name 'default' not found. Android Studio

后端 未结 13 1754
独厮守ぢ
独厮守ぢ 2020-11-27 05:44

I have an Android Studio app. It has a library dependency (Android-Bootstrap), when I try to sync gradle, it gives me an error:

Configuration with nam

相关标签:
13条回答
  • 2020-11-27 06:28

    For one, it doesn't do good to have more than one settings.gradle file -- it only looks at the top-level one.

    When you get this "Configuration with name 'default' not found" error, it's really confusing, but what it means is that Gradle is looking for a module (or a build.gradle) file someplace, and it's not finding it. In your case, you have this in your settings.gradle file:

    include ':libraries:Android-Bootstrap',':Android-Bootstrap'
    

    which is making Gradle look for a library at FTPBackup/libraries/Android-Bootstrap. If you're on a case-sensitive filesystem (and you haven't mistyped Libraries in your question when you meant libraries), it may not find FTPBackup/Libraries/Android-Bootstrap because of the case difference. It's also looking for another library at FTPBackup/Android-Bootstrap, and it's definitely not going to find one because that directory isn't there.

    This should work:

    include ':Libraries:Android-Bootstrap'
    

    You need the same case-sensitive spec in your dependencies block:

    compile project (':Libraries:Android-Bootstrap')
    
    0 讨论(0)
提交回复
热议问题