Configuration with name 'default' not found. Android Studio

后端 未结 13 1753
独厮守ぢ
独厮守ぢ 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:06

    If you're getting this error with react native, it may be due to a link to an NPM package that you removed (as it was in my case). After removing references to it in the settings.gradle and build.gradle files, I cleaned and rebuilt and it's as good as new :)

    0 讨论(0)
  • 2020-11-27 06:07

    In my setting.gradle, I included a module that does not exist. Once I removed it, it started working. This could be another way to fix this issue

    0 讨论(0)
  • 2020-11-27 06:09

    Your module name must be camelCase eg. pdfLib. I had same issue because I my module name was 'PdfLib' and after renaming it to 'pdfLib'. It worked. The issue was not in my device but in jenkins server. So, check and see if you have such modulenames

    0 讨论(0)
  • 2020-11-27 06:15

    Step.1 $ git submodule update

    Step.2 To be commented out the dependences of classpass

    0 讨论(0)
  • 2020-11-27 06:16

    Just a note on this question:

    I had this exact error in my React Native app when trying to build to android. All you should have to do is $ npm i.

    0 讨论(0)
  • 2020-11-27 06:16

    You are better off running the command in the console to get a better idea on what is wrong with the settings. In my case, when I ran gradlew check it actually tells me which referenced project was missing.

    * What went wrong:
    Could not determine the dependencies of task ':test'.
    Could not resolve all task dependencies for configuration ':testRuntimeClasspath'.
    Could not resolve project :lib-blah.
     Required by:
         project :
      > Unable to find a matching configuration of project :lib-blah: None of the consumable configurations have attributes.
    

    The annoying thing was that, it would not show any meaningful error message during the import failure. And if I commented out all the project references, sure it let me import it, but then once I uncomment it out, it would only print that ambiguous message and not tell you what is wrong.

    0 讨论(0)
提交回复
热议问题