Could not locate aapt. Please ensure you have the Android buildtools installed FLUTTER - flutter

I have a problem with the application that I am trying to compile, the system generates the .apk for me, but it does not manually install the application on the device that I am debugging
The console gives me the following message:
Could not locate aapt. Please ensure you have the Android buildtools installed.
Exception: Problem building Android application: see above error(s).
Exited (sigterm)
I'm new to flutter I don't know what it could be, someone help me please, I'll be grateful

Related

Flutter SDK 0.0.0-unknown [xcrun: error: invalid active developer path] after MacOS Ventura update

I upgraded my software yesterday to MacOS Ventura. Today when I opened my project so I can work on it, I cannot get to build the app because I get this error: The current Flutter SDK version is 0.0.0-unknown.
Running "flutter pub get" in elfi_menu...
The current Flutter SDK version is 0.0.0-unknown.
Because country_icons 2.0.2 requires Flutter SDK version >=0.1.4 and no versions of country_icons match >2.0.2 <3.0.0, country_icons ^2.0.2 is forbidden.
So, because elfi_menu depends on country_icons ^2.0.2, version solving failed.
pub get failed (1; So, because elfi_menu depends on country_icons ^2.0.2, version solving failed.)
Exited (1)
I have tried to reinstall flutter, I get the same error, I also tried opening a new project, same error. I also looked it up on the internet but I saw pretty old similar issues, they are fixing it on Windows and it is not the same here on mac from what I've seen.
Does anyone have any ideas why this happened and how to fix it?
Thank you very much in advance
EDIT
Above the output I have written in the code, this is a line that appeared:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
I searched for the solve on the internet and this like solves the problem, written in the terminal:
xcode-select --install
This fixed it for me:
Open Xcode
Go to Preferences
Go to Locations
Use the "Command Line Tools" dropdown to select the available Command Line Tools
Mine was empty and I chose the single available option: "Xcode 14.0.1 (...)"
Restart console, everything should be working
To solve the problem, I have written this in the terminal:
xcode-select --install
source: https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a

What went wrong: Execution failed for task ':app:validateSigningDebug'

here is the exception I get when I try to run simple flutter app on my physical device
I was working flutter projects on Android studio and run it successfully , but after I update it with flutter and dart , I coudn't even run a simple app .. it requires me a unique application Id
here is how my build.gradle file looks like with the to do hint
The error says Failed to create keystore, please refer to this answer

error when i run flutter doctor --android-license

Good day Guys, i'm new on flutter & I wan set up flutter and the android SDK(without using android studio) on my device but when i run flutter doctor --android-licenses command i get this error after running the command
(/home/olaneat/android/Sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/linux#android-setup for
detailed instructions.
this is how i configured my path
ANDROID_HOME="$PATH:/home/olaneat/android/Sdk"
export PATH="$PATH:/home/olaneat/android/Sdk/platform-tools"
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
export PATH="$JAVA_HOME/bin:$ANDROID_HOME/cmdline-tools/tools/bin:$ANDROID_HOME/platform-tools:SPATH"
and i have my SDK already installed
can anyone help out?
Update cmdline-tools direcotry
Try changing the path name cmdline-tools/tools to cmdline-tools/latest. I was facing the same problem and found that the directory patern has been updated.

Can't run flutter project due to error VERBOSE.dart error, isolate error

When I try to run my flutter-project code on the iOS simulator in VS code, I get the following error on the console:
Launching lib/main.dart on iPhone 11 Pro in debug mode...
lib/main.dart:1
Xcode build done. 24.4s
[VERBOSE-2:shell.cc(103)] Dart Error: Can't load Kernel binary: Invalid SDK hash.
[VERBOSE-2:dart_isolate.cc(171)] Could not prepare isolate.
[VERBOSE-2:runtime_controller.cc(415)] Could not create root isolate.
[VERBOSE-2:shell.cc(588)] Could not launch engine with configuration.
Thanks in advance.
Hi!
In my case, the error was caused by the forced shutdown of the IDE.
After manually selecting the libraries, I identified the one that was causing the problem, updated the project without it, and updated the project again with it.
With that the problem was solved.
Hope I have helped, if yes, please flag.
Could you delete the bin/cache folder, then run app
Open terminal and run: $ flutter channel beta
"it will install beta version, once installation is done, try it!"
"In case you willing to change the beta version to stable version you can use the following:"
$ flutter channel stable

Flutter sample build issue

I am getting this error when trying to run the sample first_app in flutter after opening it in VS CODE.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/ts/Documents/Dev/first_app/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar
detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone 8.
Does anyone know what could be causing this? Thanks!