Configuration with name 'default' not found. Android Studio

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

    I also faced the same problem and the problem was that the libraries were missing in some of the following files.

    settings.gradle, app/build.gradle, package.json, MainApplication.java

    Suppose the library is react-native-vector-icons then it should be mentioned in following files;

    In app/build.gradle file under dependencies section add:

    compile project(':react-native-vector-icons')

    In settings.gradle file under android folder, add the following:

    include ':react-native-vector-icons' project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')

    In MainApplication.java, add the following:

    Import the dependency: import com.oblador.vectoricons.VectorIconsPackage;

    and then add: new VectorIconsPackage() in getPackages() method.

提交回复
热议问题