Gradle Issue in Android Studio - android

Extracted the android package from ionic project, opened it in Android Studio,
Distribution URL : https\://services.gradle.org/distributions/gradle-7.4-all.zip
Inside Project level build.gradle : classpath 'com.android.tools.build:gradle:7.4'
Inside cash.properties : gradle.version=7.4
Getting below error in Android Studio :
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find com.android.tools.build:gradle:7.4.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.4/gradle-7.4.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/7.4/gradle-7.4.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
BUILD FAILED in 746ms
What might be the Issue ?

From what i've seen here, version 7.4 is not yet available on Google maven repositories.
You could try targeting a lower version (like 7.3.0-alpha05, or 7.1.2 if you need stable release), and don't forget to set the same version to your distributionUrl.

Related

why I have this error when I try to build apk of the project in flutter 'wrong Could not resolve all dependencies for configuration ':classpath'.'?

I followed a tutorial to install flutter with vs code now when I try to build the project apk je encounters this error below:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not load module metadata from C:\Users\Adeol\.gradle\caches\modules-2\metadata-2.96\descriptors\com.android.tools.ddms\ddmlib\27.1.0\11cd36a7dcab7d14d0c14c5e6c7582e3\descriptor.bin
* 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
when I created a new project in flutter I wanted to test to see if it works with the default code in main.dart but I have this error above. Of course I searched on google and YouTube I tried to modify the version of the Gradle but without hope. Can you help me please?

could not resolve all dependencies for configuration ':classpath' on flutter

hi recently I upgrade and flutter to v2 and my android studio too but after that my flutter app gives a Gradle error and cant be extracted I tried too hard to do many solutions like but maven in dependency but it still gives an error.the gradle version is now 5.6 or something and one more thing all the application running well still which i made before upgrade and its gradle version is
Please help me out and the error is given below.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':classpath'.
Could not load module metadata from C:\Users\dell.gradle\caches\modules-2\metadata-2.96\descriptors\com.android.tools\annotations\27.1.0\11cd36a7dcab7d14d0c14c5e6c7582e3\descriptor.bin
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 20s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Could not find androidx.legacy:legacy-support-v4:27.0.2

I added geolocator dependency and then I get an error of android x incompatibility. can any help me to get out of this?
Launching lib\main.dart on Android SDK built for x86 in debug mode...
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:debugRuntimeClasspath'.
> Could not find androidx.legacy:legacy-support-v4:27.0.2.
Searched in the following locations:
- file:/C:/Users/Rutvik/AppData/Local/Android/sdk/extras/m2repository/androidx/legacy/legacy-support-v4/27.0.2/legacy-support-v4-27.0.2.pom
Required by:
project :app > project :image_picker
* 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 1m 7s
****************************************************
Migrating all the dependancies to andriodx packages will resolve this issue. https://developer.android.com/jetpack/androidx/migrate
Here your geo-locator latest uses androidx packages where image_picker dependency uses android package. You need to update image_picker library to latest https://pub.dev/packages/image_picker#-changelog-tab-
or
Quick fix: Downgrade geo-locator to 2.1.1 to resolve this issue. This is not a best approach.
Upgrading all the dependancies to androidx compatable is best approach you can try.

I am getting issue after update all plugin in Phone Gap Projects in Android Platform from Android Studio

I am getting issue after update all plugin in Phone Gap Projects in Android Platform from Android Studio.
when i am trying to build the app that time i am getting this issue, for details please check my attached image .
Issue is:
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.google.firebase:firebase-messaging:11.0.1.
Required by:
project :
Could not find com.google.firebase:firebase-core:11.0.1.
Required by:
project :
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
enter image description here

Could not find any version that matches com.android.support:appcompat-v7:+. in android eclipse

We have added the appcompat-v7+ dependencies to eclipse and we are facing this error when trying to import flat-ui to the android project.
Not sure why this is happening.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':sample'.
Could not resolve all dependencies for configuration ':sample:_debugCompile'.
Could not find any version that matches com.android.support:appcompat-v7:+.
Required by:
com.github.eluleci:sample:2.0.2
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Go to the SDK Manager and install "Android Support Repository" in the "Extras" category. Note, don't confuse this with "Android Support Library".

Categories

Resources