Android Studio virtual machine - android

I can't open the program on the Android Studio virtual machine:
FAILURE: Build failed with an exception.
What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\L\StudioProjects\contador\android\settings.gradle' (C:\Users\L.gradle\caches\6.7\scripts\1fnwrr8g4rohfp291nvlxj5qe).
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 21s
Exception: Gradle task assembleDebug failed with exit code 1
I've already installed some SDK tools and it didn't make a difference. All Android Studio licenses are accepted, all right. I really need help

Which java version are you using? You may try to install java 8 and set it as default. I had the same problem with Java 16

Related

fastutil 7.2.0 .jar cannot be created

I have installed android studio properly, gave it all it needed for flutter development, java jdk version is 11, paths are properly given, the emulator runs fine but when i try to build my app on either emulator or a physical device, I get this error:
Launching lib\main.dart on V2109 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Where:
Build file 'D:\untitled1\android\app\build.gradle' line: 26
What went wrong:
A problem occurred evaluating project ':app'.
java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file C:\Users\ADMIN.gradle\caches\jars-9\53ad1f30a5eec66e4e9dc584d5b89b7f\fastutil-7.2.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
Here is my flutter doctor response
Please help. Your help will be appreciated
I was expecting the project to run properly, as with the same flutter doctor response and same installation procedures on 2 different laptops I was able to run properly. I have tried reinstalling android studio thrice but of no help. tried everything I could related to java (installed different versions, updating paths).

FAILURE: Build failed with an exception - Flutter run command

Im trying to run my flutter application but when i run the command "flutter run" this happen:
PS C:\workspace\allgo_fim> flutter run
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\workspace\allgo_fim\android\settings.gradle' (C:\Users\Rui\.gradle\caches\7.5\scripts\3d075fs9hjp81ny0sgym4v09w).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
* 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
Running Gradle task 'assembleDebug'... 2 694ms
Exception: Gradle task assembleDebug failed with exit code 1
Anyone can help-me?
before when I gave "flutter run" the problem was JAVA_HOME, but I think I have solved that problem and now this happened to me.

why does my flutter app not work after repeated reinstallations of java and gradle?

I have a problem with my Flutter app.
When I tried to start my app via an emulator, I got the following error message:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
Kotlin could not find the required JDK tools in the Java installation 'C:\Program Files\AdoptOpenJDK\jre-11.0.11.9-hotspot' used by Gradle. Make sure Gradle is running on a JDK, not JRE.
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
.
this is the standrad app which is created by flutter when creating a project and I have not changed it. When I received the message for the first time, I reinstalled gradle and java. but it didn't work. Can you help me?

Run a Flutter Project with Android Studio is not possible anymore

I startet my Flutter project via Android Studio for a while and i had no problem to code and to run this project from e AVD oder a physiical Device (via USB). One week ago, i had a problem because of JAVA_HOME. I could solved this problem but its still not possible to run this problem. Bow i have this message when i try to run my project:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
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
Finished with error: Gradle task assembleDebug failed with exit code 1
What can i do?
1- project fence
2- select Android / gradle / wrapper / gradle-wrapper.properties
3- change the distributionUrl line
to https \: //services.gradle.org/distributions/gradle-6.3-all.zip
That solves your problem?
Reference image
They asked the same thing here
https://stackoverflow.com/questions/35000729/android-studio-could-not-initialize-class-org-codehaus-groovy-runtime-invokerhel

Ionic Aangular :No installed build tools found. Install the Android build tools version 19.1.0 or higher

I'm trying to build an Ionic Android app but no matter what i do i get this error, here is the full error
===========================================================================
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Program Files\Java\jdk1.8.0_251 (recommended setting)
ANDROID_HOME=C:\Program Files\Java\jdk1.8.0_251 (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
Configure project :appProject evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Peter Snee\Documents\AngularIonic\quotesApp\platforms\android\CordovaLib\cordova.gradle' line: 68
What went wrong:
A problem occurred evaluating project ':app'.
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
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 4s
C:\Users\Peter Snee\Documents\AngularIonic\quotesApp\platforms\android\gradlew: Command failed with exit code 1 Error output:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Peter Snee\Documents\AngularIonic\quotesApp\platforms\android\CordovaLib\cordova.gradle' line: 68
What went wrong:
A problem occurred evaluating project ':app'.
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
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 4s
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
===========================================================================
I have uninstalled Android studio, i have changed a few environment variables, nothing seems to be working for me so im probably missing something,
Any help is greatly appreciated !
thanks
Got it,
It turns out my paths were wrong in the environment variables,
I ran
android list sdk
in the cmd and got the exact paths,
rookie mistake but sure look.

Categories

Resources