Error: Configuration with name 'default' not found in Android Studio

前端 未结 11 1695
时光说笑
时光说笑 2020-11-27 15:03

I am using the volley library to perform network operation in android. So I am trying to add this library in my project which is created in Android Studio and gradle system

相关标签:
11条回答
  • 2020-11-27 15:43

    Removing few react-native dependencies solved the problem

    Deleting these lines the problem is resolved. This line is created by rnpm link but is a bug.

    compile project(':react-native-gps')
    compile project(':react-native-maps')
    
    0 讨论(0)
  • 2020-11-27 15:48

    This is probably a rare case, but for me a library that was included in the settings.gradle was not there.

    E.g. I had: include ':libraries:Android-RateThisApp:library' in my settings.gradle

    but the folder Android-RateThisApp was empty. As soon as I checked out this submodule the gradle sync succeed.

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

    Add your library folder in your root location of your project and copy all the library files there. For ex YourProject/library then sync it and rest things seems OK to me.

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

    If you want to use the same library folder for several projects, you can reference it in gradle to an external location like this:

    settings.gradle:

    include 'app', ':volley'
    project(':volley').projectDir = new File('../libraries/volley')
    

    in your app build.gradle

    dependencies {
        ...
        compile project(':volley')
    ...}
    
    0 讨论(0)
  • 2020-11-27 15:55

    I also facing this issue but i follow the following steps:-- 1) I add module(Library) to a particular folder name ThirdPartyLib

    To resolve this issue i go settings.gradle than just add follwing:-

    project(':').projectDir = new File('ThirdPartyLib/')

    :- is module name...

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