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

[Bug]: Platform-samples won't find the java toolchain #72

Closed
2 tasks done
FerdinandoPH opened this issue Aug 7, 2023 · 4 comments
Closed
2 tasks done

[Bug]: Platform-samples won't find the java toolchain #72

FerdinandoPH opened this issue Aug 7, 2023 · 4 comments
Assignees
Labels
bug Something isn't working Stale

Comments

@FerdinandoPH
Copy link

FerdinandoPH commented Aug 7, 2023

Is there an existing issue for this?

  • I have searched the existing issues

In which area is the issue?

General

In a specific sample?

No response

What happened?

I have followed the instructions for running the platform-samples project, but Android Studio says that there is no vaild java toolchain. I have tried everything I could think of, but to no avail (foojay resolver appears won't work because it is "duplicated" somewhere in the code). Where can I find said toolchain and where should I place it for gradle to find it. I have a windows 11 pc

Relevant logcat output

A problem occurred configuring root project 'Platform Samples'.
> Could not determine the dependencies of null.
   > Could not resolve all dependencies for configuration ':classpath'.
      > Failed to calculate the value of task ':build-logic:compileJava' property 'javaCompiler'.
         > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific}.
            > No locally installed toolchains match (see https://docs.gradle.org/8.1/userguide/toolchains.html#sec:auto_detection) and toolchain download repositories have not been configured (see https://docs.gradle.org/8.1/userguide/toolchains.html#sub:download_repositories).

Code of Conduct

  • I agree to follow this project's Code of Conduct
@FerdinandoPH FerdinandoPH added the bug Something isn't working label Aug 7, 2023
@FerdinandoPH
Copy link
Author

FerdinandoPH commented Aug 7, 2023

Installing jdk 17.0.8 using the official windows installer yields this other error:

`

A problem occurred configuring root project 'Platform Samples'.

Could not determine the dependencies of null.
Could not resolve all task dependencies for configuration ':classpath'.
> Could not resolve project :build-logic.
Required by:
project :
> No matching variant of project :build-logic was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.1' but:
- Variant 'apiElements' capability com.example.platform.plugin.buildlogic:build-logic:unspecified declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.1')
- Variant 'mainSourceElements' capability com.example.platform.plugin.buildlogic:build-logic:unspecified declares a component, and its dependencies declared externally:
- Incompatible because this component declares a component of category 'verification' and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.1')
- Doesn't say anything about its usage (required runtime)
- Variant 'runtimeElements' capability com.example.platform.plugin.buildlogic:build-logic:unspecified declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.1')
- Variant 'testResultsElementsForTest' capability com.example.platform.plugin.buildlogic:build-logic:unspecified:
- Incompatible because this component declares a component of category 'verification' and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.1')
- Doesn't say anything about its usage (required runtime)
`

@marcelpinto
Copy link
Contributor

Which Android Studio version are you using? The #54 should have fixed this

@FerdinandoPH
Copy link
Author

Which Android Studio version are you using? The #54 should have fixed this

I'm using the latest version from the website (2022.3.1)

@marcelpinto marcelpinto self-assigned this Aug 11, 2023
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants