See the console for more details unity - unity3d

I got an error Gradle build failed. I'm using 2021.3.8f1 version
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
> Could not find com.android.tools.build:gradle:6.1.1.
Searched in the following locations:
-
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.1.1/gradle-
6.1.1.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/6.1.1/gradle-6.1.1.pom
Required by:
Required by:
project :launcher
* 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
I'm trying to fix this error in android studio, But android studio shows add maven. So add it in build.gradle. But it doesn't work. I'm struggling to fix this please Someone help me fix this error.

Related

error after icon style in flutter android studio

i tried to style my app icon in android studio by
going to -open android module , ---new windows - app-res-image asset
but after resizing image i got this error. and also image asset is not available any more.
where did i go wrong? what can i do ?
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:7.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.0/gradle-7.3.0.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 1s
Exception: Gradle task assembleDebug failed with exit code 1

Gradle error while running flutter app in Android Studio

Anytime I try to run the default flutter app in android studio, I get an error saying this
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\NAME\StudioProjects\first_app\android\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Could not open proj generic class cache for build file 'C:\Users\Jonat\StudioProjects\first_app\android\app\build.gradle' (C:\Users\Jonat\.gradle\caches\6.7\scripts\9jolsr12r2iru3ssdih8as3s3).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1
I tried searching for an answer but I did not find a solution. I decided to open my command prompt and type in Gradle and this is what I see,
I don't know what to do or where to start since I am new to android studio. Is there a way to get rid of this error?
UPDATE
I went to the folder that was mentioned in the first error and all I needed to do was update the Gradle and it loaded everything. But now I'm receiving a new error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module #77e838c
* 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.
would anyone know how to go about this error?

run the app for first time have this error

i am begginer
i try to play an app in android studio but I cant and showed me this error.
can you help me?
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 builder.jar (com.android.tools.build:builder:3.5.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.0/builder-3.5.0.jar
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 3s
Exception: Gradle task assembleDebug failed with exit code 1

imagepicker won't let me run my app on android, on IOS it works fine

When I run my app in ios simulation everything works fine, but on android I have an error I think with image picker and gradle here is the error :
I tried the mutlidex solution but it does not seem to work.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':image_picker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 44s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to
try using Jetfier to solve the incompatibility.
Building plugin image_picker...
> Configure project :
WARNING: The option setting 'android.enableR8=true' is experimental and unsupported.
The current default is 'false'
Consider disabling R8 by removing 'android.enableR8=true' from your gradle.properties before
publishing your app.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'imagepicker'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with
an ANDROID_HOME environment variable.
* 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 7s
Exception: The plugin image_picker could not be built due to the issue above.

Flutter build error: A problem occurred configuring root project 'bidirectional_scroll_view'

I am trying to build my project to APK file, but I am stuck with this error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'bidirectional_scroll_view'.
> Failed to notify project evaluation listener.
> org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V
* 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 910ms
The plugin bidirectional_scroll_view could not be built due to the issue above.
The command I had run is this: flutter build apk --split-per-abi.
If someone would help me I would be glad! :D
I was just using an old version of bidirectional_scroll_view package.