I just created a new project using command palletes in vsCode. then i start android simulator and then flutter run. it's running perfectly on ios not on android .
this debug console response
Launching lib/main.dart on Android SDK built for x86 in debug mode... FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugAidl'.
java.lang.IllegalStateException: aidl is missing from '/Users/sachin/Library/Android/sdk/build-tools/26.0.2/aidl' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 1s Gradle build failed: 1 Exited (sigterm)
Just now I encounter the same problem. It happened because after doing "flutter run" there's still some file that needs to be downloaded, the
build tools, but didn't get downloaded correctly, because I stopped it in the middle, since I thought the process was stuck.So, these are the steps that solve the problem:
/Users/[USERNAME]/Library/Android/sdk/build-tools/, in your case, typecd /Users/sachin/Library/Android/sdk/build-tools/26.0.2 folder, so in your terminal typerm -r 26.0.2to remove it.build tools, you can watch this in the finder by typingopen .26.0.2 folderthere'saidlfile added when the process is finished.