Could not open settings generic class cache for settings - java

hi i'm getting this error in android studion windows 10 any solution?
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\acer\StudioProjects\untitled2\android\settings.gradle' (C:\Users\acer\.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 919ms
Exception: Gradle task assembleDebug failed with exit code 1

Try like below:
Go to wrapper directory android >> gradle folder.
Delete gradle-wrapper.jar file
Edit gradle-wrapper.properties file
Sync project
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip or latest

Related

FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\dell\AndroidStudioProjects\attendance_manager\android\build.gradle' line: 26

FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\dell\AndroidStudioProjects\attendance_manager\android\build.gradle' line: 26 * 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\dell\AndroidStudioProjects\attendance_manager\android\app\build.gradle' (C:\Users\dell.gradle\caches\7.4\scripts\6kf7hlj2razsy2gytva6h994n). > 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.
I tried to remove invalidate caches , after that i restart my computer , after that i unistall my flutter app in my device but, nothig happen.
Check your java version , if your Java version is 18,19 or 20 delete your latest version and try to use Java-8 or Java-11.
-> I tried Java version 11 , My error was solve

React Native android release error A problem occurred evaluating project ':app'. > Could not find method splits() for arguments error

i have a problem when receiving application release
yarn android --variant release i'm running this command and gives me the following error;
yarn android --variant release
yarn run v1.22.19
$ react-native run-android --variant release
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
5 actionable tasks: 5 up-to-date
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user_0\Desktop\AwesomeProject\android\app\build.gradle' line: 216
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method splits() for arguments [build_9cj0nm0uy7u5p9mmnrxyr8ysi$_run_closure6#3c34a482] on project ':app' of type org.gradle.api.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
BU�LD FAILED in 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installRelease -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\user_0\Desktop\AwesomeProject\android\app\build.gradle' line: 216
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method splits() for arguments [build_9cj0nm0uy7u5p9mmnrxyr8ysi$_run_closure6#3c34a482] on project ':app' of type org.gradle.api.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
BU�LD FAILED in 3s
at makeError (C:\Users\user_0\Desktop\AwesomeProject\node_modules\execa\index.js:174:9)
at C:\Users\user_0\Desktop\AwesomeProject\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\user_0\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\user_0\Desktop\AwesomeProject\node_modules\#react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
https://reactnative.dev/docs/signed-apk-android i followed these steps exactly. i tried again 3-4 times but nothing changes. how can i fix this ?

I am new to flutter app development. Got handover of the flutter project and tried to run, but getting Build Failed Exception by terminal command

My app was working fine and all of a sudden this error popped up and no longer works
Launching lib\main.dart on Redmi Note 9S in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\abumo.gradle\caches\transforms-2\files-2.1\e8b87230ecc8f4137f972d2f499610c1\play-services-ads-lite-20.0.0\AndroidManifest.xml:27:5-43:15: AAPT: error: unexpected element found in .
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 2m 46s
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 apple_sign_in...
Running Gradle task 'assembleAarRelease'...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'apple_sign_in'.
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 5s
Exception: The plugin apple_sign_in could not be built due to the issue above.
pleas help me

Flutter FireBase Storage setup .......... can't even build empty project

I have watched every YouTube video and I can't get right
I followed the firebase docs step by step
still it gives me this
error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_storage:javaPreCompileRelease'.
> Could not resolve all files for configuration ':firebase_storage:releaseCompileClasspath'.
> Could not find firebase-common.jar (com.google.firebase:firebase-common:17.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-common/17.0.0/firebase-common-17.0.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 45s
Running Gradle task 'assembleRelease'... 46.4s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1
Please help.
I lowered the version of Flutter storage package to 3.0.0 and it works fine.

Flutter Build Fail after reinstalling Windows

I reinstalled Windows and AndroidStudio, now my project gets this Build error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:signingConfigWriterDebug'.
> java.nio.file.AccessDeniedException: E:<theprojectpath>\build\app\intermediates\signing_config\debug\out\signing-config.json
* 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
Okay, I fixed it:
Delete your build-cache and your cache folder in your .android folder.
Usually located here C:\Users\username\.android
Delete the build folder in your flutter project folder.
(...)\flutter_project_name\build

Categories

Resources