how to run with --stacktrace flutter - android

I'm trying to run my application -that is working fine with my team members-
but i keep getting this error
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':package_info_plus'.
Could not load compiled classes for build file 'C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\package_info_plus-1.4.3+1\android\build.gradle' from cache.
Failed to notify project evaluation listener.
Could not get unknown property 'android' for project ':package_info_plus' of type org.gradle.api.Project.
Could not get unknown property 'android' for project ':package_info_plus' 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
BUILD FAILED in 16s
Does anyone know the solution or can tell me how to view the stacktrace, I tried going to android studio-> settings-> compiler-> command
and i added --stacktrace but there is no changes in the run

try flutter run -d deviceid -v , will give you an insight as to whats happening
You can also cd into the android folder and run ./gradlew build

Related

flutter error run on gradle task in my macbook air (intel) . I am trying many way but sad life .Its run on chrome but won't run in connected device

FAILURE: Build failed with an exception.
What went wrong:
A problem was found with the configuration of task ':app:processDebugResources' (type 'LinkApplicationAndroidResourcesTask').
In plugin 'com.android.internal.version-check' type 'com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask' property 'androidJarInput.androidJar' specifies file '/Users/macbook/Library/Android/sdk/platforms/android-31/android.jar' which doesn't exist.
Reason: An input file was expected to be present but it doesn't exist.
Possible solutions:
Make sure the file exists before the task is called.
Make sure that the task which produces the file is declared as an input.
Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#input_file_does_not_exist for more details about this problem.
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

Flutter : A problem occurred configuring project ':speech_to_text'

I tried all possible way but didn't find how to configure " speech_to_text" in my existing flutter project.
Independent speech to text app working fine but i am not able to integrate in my existing app.
below steps i did still no luck :
Internet and record audio permission in Android manifest.
adding latest dependencey in pubspec.yaml speech_to_text
import 'package:speech_to_text/speech_to_text.dart' as stt;
stt.SpeechToText _speec = stt.SpeechToText();
5 . I change gradle version also which is same gradle version of woking "speech to text" app but independently
and i get below error
Log :
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':speech_to_text'.
Failed to create Jar file C:\Users\jitkumar.gradle\caches\jars-8\c58c0f61a1162f88da75275a98d7f55b\auto-value-1.5.2.jar.
Could not get unknown property 'android' for project ':speech_to_text' 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
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
Thanks

How to resolve Gradle task assembleDebug failed with exit code 1 in my first flutter app?

I recently come from java and try to make my first app in flutter in android studio in windows 10.
I tried first sample code in my real android device and got this error.
I cant find proper after struggling 5 hours
In console get this error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> NDK at C:\Users\10\AppData\Local\Android\sdk\ndk-bundle did not have a source.properties file
* 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
Looks like you are missing NDK installation. Please confirm if highlighted item is installed

Kotlin basic program is not working in android studio

I have recently installed Android studio 4.1.1. I am getting below error while executing "Hello world" kotlin program in android studio. kindly help me..
Where:
Initialization script 'C:\Users\pcadmin\AppData\Local\Temp\KotlinBasicsKt_main__.gradle' line: 27
What went wrong:
A problem occurred configuring project ':app'.
Could not create task ':app:KotlinBasicsKt.main()'.
SourceSet with name 'main' 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.
Get more help at https://help.gradle.org
BUILD FAILED in 34s
16:25:40: Task execution finished 'KotlinBasicsKt.main()'.

How to Run with --stacktrace option to get the stack trace

I keep getting this error and i don't seem to find any help online. I am new to flutter and android studio. any help is well appreciated
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Android\Android Studios\cravings\android\app\build.gradle' line: 26
What went wrong:
A problem occurred evaluating project ':app'.
Could not open dsl remapped class cache for eq9b73nqpstq0kplnrtticwqc (C:\Users\October Price.gradle\caches\5.6.2\scripts-remapped\flutter_f2f86ofj12jp9hosmvp06kahh\eq9b73nqpstq0kplnrtticwqc\dsl9d9bdfa13168004751655a79e56a065e).
Unexpected lock protocol found in lock file. Expected 3, found 0.
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
You can try running the assembleDebug Gradle task manually.
cd android
./gradlew assembleDebug --stacktrace
But there could be something wrong with your configuration.
Run flutter doctor -v and see if everything is setup correctly.
Otherwise you can try deleting the Gradle cache folder which seem to bet at C:\Users\October Price.gradle\caches.
You can set your android compiler to always run with --stacktrace modifier.
Head to Settings > Build, Execution, Deployment > Compiler
Add --debug or --info or --stacktrace (Or combination of them) to the Command line options
In your case clearing C:\Users\October Price\.gradle\caches folder and re-syncing the project might help.
You can also use --verbose to get the full flutter stack trace. so for example:
flutter build apk --debug --verbose
You can use gradlew command to run from command line. to get more details of gradlew you can type gradlew --help. For further information regarding How to run from Command line follow this link.

Categories

Resources