Checking Java JDK and Android SDK versions ANDROIDHOME=D:\cmdline-tools (recommended…
- User
Checking Java JDK and Android SDK versions ANDROID_HOME=D:\cmdline-tools (recommended setting) ANDROID_SDK_ROOT=undefined (DEPRECATED) Using Android SDK: D:\cmdline-tools Subproject Path: CordovaLib Subproject Path: app
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring root project 'Dhammika perera'.
Could not resolve all files for configuration ':classpath'. Could not find com.android.tools.build:gradle:7.6. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.6/gradle-7.6.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/7.6/gradle-7.6.pom Required by: project : Could not find com.android.tools.build:gradle:7.6. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.6/gradle-7.6.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/7.6/gradle-7.6.pom Required by: project :
- 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
C:\Users\DELL\Desktop\mobileApp\myapp>cordova build android --stacktrace Checking Java JDK and Android SDK versions ANDROID_HOME=D:\cmdline-tools (recommended setting) ANDROID_SDK_ROOT=undefined (DEPRECATED) Using Android SDK: D:\cmdline-tools Subproject Path: CordovaLib Subproject Path: app
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring root project 'Dhammika perera'.
Could not resolve all files for configuration ':classpath'. Could not find com.android.tools.build:gradle:7.6. Searched in the following locations: - - Required by: project : Could not find com.android.tools.build:gradle:7.6. Searched in the following locations: - - Required by: project :
- Assistant
- User
here's my build.gradle
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { apply from: 'CordovaLib/cordova.gradle' apply from: 'repositories.gradle' repositories repos dependencies { classpath "com.android.tools.build:gradle:{cordovaConfig.KOTLIN_VERSION}" classpath 'com.android.tools.build:gradle:7.6' }
- Assistant
Based on the
build.gradlefile you provided, there are a couple of issues that need to be addressed:-
The
classpath 'com.android.tools.build:gradle:7.6'line is trying to add a classpath dependency for version 7.6 of the Android Gradle plugin. However, this version does not exist (as of my knowledge cutoff date in 2023), and that's why the build is failing. You must replace this version number with a valid version number. Typically, Android Gradle plugin versions are synced with the Android Studio version, so a very high version like 7.6 seems unlikely.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.