Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' #1360

Closed
digrase008 opened this issue Aug 1, 2018 · 12 comments
Labels
impact: build-error Behaviour causing build failure platform: android resolution: user Issue with users code or an issue that should be directed to Stack Overflow or the Discord server. Type: Stale Issue has become stale - automatically added by Stale bot Workflow: Waiting for User Response Blocked waiting for user response.

Comments

@digrase008
Copy link

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve project :react-native-firebase.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-firebase: None of the consumable configurations have attributes.

While creating built it's working fine but when it comes to run the built that is after performing react-native run-android I am getting built got failed with the above message

Here is my built.gradle :

buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.0.0'
// classpath 'com.google.gms:google-services:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}

ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "26.1.0"
}

@Ehesp
Copy link
Member

Ehesp commented Aug 1, 2018

Have you run the link command? Seems as though it hasn't installed properly. E.g. check https://github.com/invertase/react-native-firebase-starter/blob/master/android/settings.gradle#L2 and other files for comparison.

@Salakar Salakar added platform: android impact: build-error Behaviour causing build failure resolution: user Issue with users code or an issue that should be directed to Stack Overflow or the Discord server. Workflow: Waiting for User Response Blocked waiting for user response. labels Aug 2, 2018
@digrase008
Copy link
Author

digrase008 commented Aug 3, 2018 via email

@jozan
Copy link

jozan commented Aug 4, 2018

I solved this exact same problem by moving google() repository at the top of the list.

build.gradle

allprojects {
    repositories {
        google()
        mavenLocal()
        jcenter()
        maven {
            url 'https://maven.google.com'
        }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

@stale
Copy link

stale bot commented Sep 2, 2018

This issue has been automatically marked as stale because it has not had recent user activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label Sep 2, 2018
@stale
Copy link

stale bot commented Sep 16, 2018

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Sep 16, 2018
@Usamashahid76
Copy link

Usamashahid76 commented Nov 9, 2018

use this first
yarn remove react-native-fetch-blob
Remove compile('react-native-fetch-blob') from build.gradle from android folder

@SilajitBukaiSil
Copy link

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve project :react-native-app-auth.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-app-auth: None of the consumable configurations have attributes.

@SilajitBukaiSil
Copy link

Can anyone please tell me how to solve this issue? I already tried with ./gradlew clean in android, also delete node module and then npm install and run in android. Nothing work. Please help if any body know any other way. Thanks in advance!

@pacozaa
Copy link

pacozaa commented Mar 26, 2019

@SilajitBukaiSil Got the same problem. Do you know how to solve this?

@Fatima758
Copy link

@SilajitBukaiSil
i have same problem. did you solve that?

@Usamashahid76
Copy link

1st method,
Also remove the import of react-native-fetch-blob in any screen

yarn remove (respective command ** for instance react-native-fetch-blob)
Then go to
android/build.gradle and remove the line of compile(react-native-fetch-blob)
Then go to
main/src/java/mainactivity.java
And remove the import and line containing react-native-fetch-blob
Then finally
Command line
cd android
gradlew clean
cd..
react-native run-android

2nd method
remove node modules
npm install
cd android
gradlew clean
cd..
react-native run-android

3rd method
remove build folder from android
and then compile again

@mikehardy
Copy link
Collaborator

Everyone, first, try react-native-clean-project and after installing it run react-native clean-project-auto - second, if you still have an issue open a new issue and follow the template thoroughly please

@invertase invertase locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact: build-error Behaviour causing build failure platform: android resolution: user Issue with users code or an issue that should be directed to Stack Overflow or the Discord server. Type: Stale Issue has become stale - automatically added by Stale bot Workflow: Waiting for User Response Blocked waiting for user response.
Projects
None yet
Development

No branches or pull requests

9 participants