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

build fail: Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'. #40

Closed
whyameye opened this issue Jan 2, 2018 · 9 comments

Comments

@whyameye
Copy link

whyameye commented Jan 2, 2018

I am building with Gradle on OSX. When executing gradle build I get:

> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
   > Could not resolve project :ble.
     Required by:
         project :app
      > Unable to find a matching configuration of project :ble: None of the consumable configurations have attributes.```
@philips77
Copy link
Member

Sorry, you have to check out this: https://github.com/NordicSemiconductor/Android-Ble-library project into the same error folder (i.e. AndroidstudioProjects). If you choose another folder name or destination, edit the settings.gradle file.

@syslogic
Copy link

syslogic commented Mar 23, 2018

@philips77 you could publish the library to Maven Central and add it as dependency... have seen a few issues because of not having checked out the other one repository, it seems to be the common pitfall. this would basically make it available in just any project, by adding a single line. so far seen no libraries on Maven with native assembly, the blescan.cpp might need to be built for all available architectures. https://docs.gradle.org/current/userguide/publishing_maven.html
eg.
https://medium.com/@nmauti/sign-and-publish-on-maven-central-a-project-with-the-new-maven-publish-gradle-plugin-22a72a4bfd4b
https://gist.github.com/mautini/51e770a99f14dd13dfc7687217df20fc#file-buid-gradle

@philips77
Copy link
Member

Yes, we have done it with the dfu lib. BLE library in still under development, we will definitely publish it to jcenter/maven when done.
I'll on vacations now, I'll continue to work on it after Easter.

@Honey1994
Copy link

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

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

@Usamashahid76
Copy link

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

@philips77
Copy link
Member

The BLE Library and BLE Common Library is now on jcenter and Maven Central.

@jitheshkramesh
Copy link

jitheshkramesh commented Apr 4, 2019

I am getting an error like this.
Please help.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve com.google.android.gms:play-services-base:[15.0.1,16.0.0).
     Required by:
         project :app > com.google.android.gms:play-services-location:15.0.1
      > Failed to list versions for com.google.android.gms:play-services-base.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-base/maven-metadata.xml.
            > Could not HEAD 'https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-base/maven-metadata.xml'.
               > Read timed out
   > Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0).
     Required by:
         project :app > com.google.android.gms:play-services-location:15.0.1
         project :app > com.google.android.gms:play-services-places-placereport:15.0.1
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
   > Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0).
     Required by:
         project :app > com.google.android.gms:play-services-location:15.0.1
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 50s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        51.4s
Gradle task assembleDebug failed with exit code 1

@krishnarajan-acumenTec
Copy link

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

Could not resolve all task dependencies for configuration ':app:assembleReleaseCompileClasspath'.
Could not resolve project :MyModelLibrary.
Required by:
project :app
> The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'assembleRelease', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'. However we cannot choose between the following variants of project :MyModelLibrary:
- debugAndroidTestCompile
- debugAndroidTestRuntime
- debugRuntime
- debugUnitTestCompile
- debugUnitTestRuntime
- releaseRuntime
- releaseUnitTestCompile
- releaseUnitTestRuntime
All of them match the consumer attributes:
- Variant 'debugAndroidTestCompile' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
- Variant 'debugAndroidTestRuntime' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
- Variant 'debugRuntime' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
- Variant 'debugUnitTestCompile' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
- Variant 'debugUnitTestRuntime' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
- Variant 'releaseRuntime' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
- Variant 'releaseUnitTestCompile' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
- Variant 'releaseUnitTestRuntime' capability WelcomeT1Management:MyModelLibrary:unspecified declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Unmatched attributes:
- Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'assembleRelease')
- Doesn't say anything about its usage (required an API)
- Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'local to :MyModelLibrary' but the consumer didn't ask for it
The following variants were also considered but didn't match the requested attributes:
- Variant 'debugApiElements' capability WelcomeT1Management:MyModelLibrary:unspecified declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'assembleRelease'
- Variant 'debugRuntimeElements' capability WelcomeT1Management:MyModelLibrary:unspecified declares a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'assembleRelease'
- Variant 'releaseApiElements' capability WelcomeT1Management:MyModelLibrary:unspecified declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'assembleRelease'
- Variant 'releaseRuntimeElements' capability WelcomeT1Management:MyModelLibrary:unspecified declares a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
- Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'assembleRelease'

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants