app declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project

后端 未结 11 1898

I am importing a library module named \"wear\" in my project and while building, I am getting this:

Error : A problem occurred configuring project \':app\'.   
C         


        
相关标签:
11条回答
  • 2021-02-03 18:03

    for me, I just modify the line in settings.gradle: project(':test').projectDir = new File(rootProject.projectDir, '~/android-test') to project(':test').projectDir = new File(rootProject.projectDir, '/Users/Michael/android-test') which means avoid using "~" in the settings.gradle.

    0 讨论(0)
  • 2021-02-03 18:05

    first: rm -rf node modules

    then: npm i

    then: Build -> Clean

    then: Close Android Studio and Reopen. This time u should be promoted in the bottom area that react-native-maps needs to be installed. Click on the link and install it

    0 讨论(0)
  • 2021-02-03 18:11

    I have faced same issue when i update android studio 3.0 and following solutions works for me

    implementation project(path: ':yourModule', configuration: 'default')
    

    This solution will work if you are using Gradle 4.1 and above and Gradle Plugin Version 3.0.0 and above.

    I hope this will work for you

    0 讨论(0)
  • 2021-02-03 18:12

    This case is you don`t install the plugin.Please you install the plugin.Such as "npm install -s wear"

    0 讨论(0)
  • 2021-02-03 18:13

    I ran into a similar issue with a different set of modules. I was finally able to resolve it by reinstalling the necessary modules via npm but with the --save flag. i.e. npm install --save module-name

    It looks like if you just have the .iml file in the module folder, it's not enough for the android studio to resolve it.

    Good luck.

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