英文:
Not able to Find compatible version of embedded java version and gradle tools version for Android Studio Flamingo
问题
I tried with jdk 17 and 18 its giving me the same issue
> Could not resolve all files for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:8.0.0.
Required by:
project : > com.android.application:com.android.application.gradle.plugin:8.0.0
project : > com.android.library:com.android.library.gradle.plugin:8.0.0
No matching variant of com.android.tools.build:gradle:8.0.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0' but:
-
Variant 'apiElements' capability com.android.tools.build:gradle:8.0.0 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 11 and the consumer needed a component for use during runtime, compatible with Java 8
-
Other compatible attribute:
-
Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
-
Variant 'javadocElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
-
Incompatible because this component declares documentation and the consumer needed a library
-
Other compatible attributes:
-
Doesn't say anything about its target Java version (required compatibility with Java 8)
-
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.0')
-
Variant 'runtimeElements' capability com.android.tools.build:gradle:8.0.0 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 11 and the consumer needed a component, compatible with Java 8
-
Other compatible attribute:
-
Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
-
Variant 'sourcesElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
-
Incompatible because this component declares documentation and the consumer needed a library
-
Other compatible attributes:
-
Doesn't say anything about its target Java version (required compatibility with Java 8)
-
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.0')
If anyone else also faced the same issue with android studio flamingo please suggest some solutions.
英文:
I tried with jdk 17 and 18 its giving me the same issue
> Could not resolve all files for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:8.0.0.
Required by:
project : > com.android.application:com.android.application.gradle.plugin:8.0.0
project : > com.android.library:com.android.library.gradle.plugin:8.0.0
No matching variant of com.android.tools.build:gradle:8.0.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0' but:
-
Variant 'apiElements' capability com.android.tools.build:gradle:8.0.0 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 11 and the consumer needed a component for use during runtime, compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
-
Variant 'javadocElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- 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.0')
-
Variant 'runtimeElements' capability com.android.tools.build:gradle:8.0.0 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 11 and the consumer needed a component, compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
-
Variant 'sourcesElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 8)
- 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.0')
If anyone else also faced the same issue with android studio flamingo please suggest some solutions.
答案1
得分: 2
在设置中更改Gradle Java JDK为17,可能会解决您的问题。
英文:
Change in Settings->Gradle Java JDK to 17 it maybe solves your problem
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论