Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 912 - android

I started getting this error after the last update.
FAILURE: Build failed with an exception.
Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line:
912
What went wrong: A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Could not create task ':app:packLibsflutterBuildDebug'.
> No signature of method: org.gradle.api.tasks.bundling.Jar.destinationDir() is applicable for
argument types: (File) values:
[C:\Users\gurka\OneDrive\Belgeler\GitHub\projectname\build\app\intermediates\flutter\debug]
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 2s
I tried flutter clean e.g
flutter run -v result

Related

[React Native][0.71] Plugin with id 'com.facebook.react' not found

Plugin with id 'com.facebook.react' not found.
1: Task failed with an exception.
Where:
Build file 'android/app/build.gradle' line: 2
What went wrong:
A problem occurred evaluating project ':app'.
Plugin with id 'com.facebook.react' not found.
==============================================================================
* Get more help at https://help.gradle.org
BUILD 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 app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'android/app/build.gradle' line: 2
* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.facebook.react' not found.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle
* 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
Solution
Add classpath("com.facebook.react:react-native-gradle-plugin") in android/build.gradle dependencies

I tried to run the App, But Gradle is throwing this error

`
FAILURE: Build failed with an exception.
Where:
Build file '/Users/theroushan/Documents/NextSchool/android/app/build.gradle' line: 32
What went wrong:
A problem occurred evaluating project ':app'.
No signature of method: build_4a37y44n4qcdao4l4d5njw5b5.android() is applicable for argument types: (build_4a37y44n4qcdao4l4d5njw5b5$_run_closure2) values: [build_4a37y44n4qcdao4l4d5njw5b5$_run_closure2#73288fd8]
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 to run the app, but I am getting this error in flutter?

Flutter - No signature of method: build_ajdeszrvira2c4ut4defndizu.android() is applicable

my app work good on the emulator but now nothing, i have no idea what happend - need help please
"
Launching lib\main.dart on M2004J19C in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\comG1\Desktop\App002\sinai_app\android\app\build.gradle' line: 30
What went wrong:
A problem occurred evaluating project ':app'.
No signature of method: build_ajdeszrvira2c4ut4defndizu.android() is applicable for argument types: (build_ajdeszrvira2c4ut4defndizu$_run_closure2) values: [build_ajdeszrvira2c4ut4defndizu$_run_closure2#493a10fc]
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 2s
Exception: Gradle task assembleDebug failed with exit code 1
"

failed to build react native project

I had been able to build and run the react-native project in my old intel based mac successfully. Recently I migrated my project to the apple silicon and now I'm having issues building and running react-native project on m1 mac. When I run the npx react-native run-android I get below error message in the console:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/sussol/Documents/Git/mobile/android/app/build.gradle' line: 120
* What went wrong:
A problem occurred evaluating project ':app'.
> ../package.json (No such file or directory)
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle
* 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 4s
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 app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/sussol/Documents/Git/mobile/android/app/build.gradle' line: 120
* What went wrong:
A problem occurred evaluating project ':app'.
> ../package.json (No such file or directory)
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle
* 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 tried various things to get it working like cleaning gradle, using different build tools versions etc. But none of them worked. Does anybody has any idea what's going on here? Any help would really be appreciated. Thanks.

A problem occurred configuring project ':background_locator'

While build the app get an error like
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':background_locator'.
> Could not load compiled classes for build file 'C:\flutter\.pub-cache\hosted\pub.dartlang.org\background_locator-1.6.12\android\build.gradle' from cache.
* 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 23s
Exception: Gradle task assembleDebug failed with exit code 1
How to solve this issue

Categories

Resources