I get this error whan launching my flutter application : "Could not GET 'https://jitpack.io/me/carda/androidcore/0.7.2/androidcore-0.7.2.aar'. " [closed] - flutter

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed last month.
Improve this question
I get the error below when launching my flutter application .
Launching lib\main.dart on SM A125F in debug mode...
Running Gradle task 'assembleDebug'...
Warning: This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Warning: �l�ment inattendu (URI : "", local : "extension-level"). Les �l�ments attendus sont <{}codename>,<{}layoutlib>,<{}api-level>
Warning: �l�ment inattendu (URI : "", local : "base-extension"). Les �l�ments attendus sont <{}codename>,<{}layoutlib>,<{}api-level>
Format incorrect du param�tre -
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform androidcore-0.7.2.aar (me.carda:androidcore:0.7.2) to match attributes {artifactType=android-assets, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not download androidcore-0.7.2.aar (me.carda:androidcore:0.7.2)
> Could not get resource 'https://jitpack.io/me/carda/androidcore/0.7.2/androidcore-0.7.2.aar'.
> Could not GET 'https://jitpack.io/me/carda/androidcore/0.7.2/androidcore-0.7.2.aar'. Received status code 521 from server:
* 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 8s
Retrying Gradle Build: #1, wait time: 100ms
[!] Gradle threw an error while downloading artifacts from the network.
This is the result of flutter doctor on my machine .
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.3, on Microsoft Windows [version 10.0.22621.963], locale fr-SN)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2021.3)
[√] IntelliJ IDEA Ultimate Edition (version 2022.1)
[√] VS Code (version 1.74.1)
[√] Connected device (4 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category.
I just want to lauch my flutter application . The code was working perfectly the last time I opened it

It is working now. I don't apply any fix it's just the server was down .
But now it is working perfectly Thank's #Ber

Related

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' in android studio

I get these errors When I run flutter application using android studio.How can I solve this problem
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
patcher;v4 SDK Patch Applier v4
emulator Android Emulator
platforms;android-31 Android SDK Platform 31
build-tools;30.0.3 Android SDK Build-Tools 30.0.3
tools Android SDK Tools
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /usr/lib/android-sdk
* 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 27s
Exception: Gradle task assembleDebug failed with exit code 1
enter image description here
This error is due to you not accepting the required licences to run a project in an emulator I think so head over to your Tools menu at the top of Android studio->SDK Manager-> Mark the checkbox written Android SDK BuildsTools under the SDK Toold Tab let it download and you'll be prompted to accept the licencing. Thank you

how to accepts certificates in android studio

Hi all my name is Vijay Rathwa and I am totally new in flutter and for programing and for coding language. please help me I am stuck in flutter. the error is below. please guide me step by step to solve the problem. Thank you
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-30 Android SDK Platform 30
build-tools;29.0.2 Android SDK Build-Tools 29.0.2
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: C:\Users\Wins\AppData\Local\Android\sdk
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 3m 19s
Exception: Gradle task assembleDebug failed with exit code 1
in flutter you should accept android sdk with this command
flutter doctor --android-licenses
before that you should specify sdk on operation system environment
Kindly check to ensure if the Android SDK Platform-Tools and Android SDK Build Tools are installed on your computer using Android Studio.
I faced the same issue some time ago, installing these tools using Android Studio helped me resolve the issue.

I am using VS Code for Flutter. I have downloaded Android SDK platform 30. But it tells me to download 29 version

I am new to flutter. Here is a list of available tools on SDK Manager -
As you can see I've downloaded the tools. But debugging in the ide shows an error and tells me download a tools that are not installed -
'''
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to install the following SDK components:
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
platforms;android-29 Android SDK Platform 29
Install the missing components using the SDK manager in Android Studio.
2
* 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 51s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
'''
Please help me out.
There seemed to be errors in installing certain dependencies ( sdk 30 ). Might be a technical glitch. Try installing again using flutter doctor.
I think you have to accept the licenses before building.
Try this command in the terminal
flutter doctor --android-licenses
Try flutter doctor command in your terminal. which helps us diagnose issues with your setup
flutter doctor
to learn more https://stackoverflow.com/a/55641042/7904389
Please share the android/app/build.gradle, it is probably targeting API level 29 (targetSdkVersion 29 and compileSdkVersion 29). Change them to 30 or download the API level 29 SDKs.
If it still doesn't work after that, the SDK might be missing, go to the ANDROID_HOME directory and ensure it contains an sdk directory with the stuff you want.
I couldn't figure out what the error was, but creating a new project worked for me.

flutter project cant run in visual studio

FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /usr/lib/android-sdk
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 4s
Exception: Gradle task assembleDebug failed with exit code 1
You have to accept licences before building app in visual studio.
This is only one time configuration to be done. Have you done it?
If not then run following command:
In Windows
%ANDROID_HOME%/tools/bin/sdkmanager --licenses
In Linux
yes | ~/Android/Sdk/tools/bin/sdkmanager --licenses
In macOS
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
yes | ~/Library/Android/sdk/tools/bin/sdkmanager --licenses
If still problem persist then let me know.

FAILURE: Build failed with an exception (Shared preference and gradle wrapper properties)

I am getting this error when i run the flutter run --release command on terminal. Kindly help me in solving this problem and let me know where i am doing wrong to make its release build successfully.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\flutter\.pub-cache\hosted\pub.dartlang.org\shared_preferences_macos-0.0.1+2\android\build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'shared_preferences_macos'.
> Failed to apply plugin [id 'com.android.library']
> Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in C:\flutter\.pub-cache\hosted\pub.dartlang.org\s
hared_preferences_macos-0.0.1+2\android\gradle\wrapper\gradle-wrapper.properties to gradle-5.4.1-all.zip
* 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 14s
The plugin shared_preferences_macos could not be built due to the issue above.
This is my flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] Connected device (1 available)
• No issues found!
I also updated my gradle wrapper properties to this one but got the same issue
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Thanks #umair for the solution. Let me give a brief understanding of solution.
We have to update the version in gradle-wrapper.properties file of respective plugins where an error is showing.
Let's say if error is showing for "shared_preferences_macos" then we have to update version number in gradle-wrapper.properties file of "shared_preferences_macos" plugin from below path.
PATH: /Users/admin/Library/Android/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+3/android/gradle/wrapper/gradle-wrapper.properties
From the above path we have to open gradle-wrapper.properties file and have to update version to 5.4.1 from 4.10.2 in distributionUrl variable and save the file. That's it.
Note:
A path for gradle-wrapper.properties file of the respective plugin will be shown on your terminal error message
Suggested Gradle version will also be shown on your terminal error message
Repeat the same process for all the plugins where you were facing an error message.