1

vsCode でコマンド パレットを使用して新しいプロジェクトを作成しました。次に、Android シミュレーターを起動し、フラッターを実行します。Android ではなく iOS で完全に動作しています。

このデバッグ コンソールの応答

x86 用にビルドされた Android SDK で lib/main.dart をデバッグ モードで起動しています... 失敗: ビルドが例外で失敗しました。* 問題: タスク ':app:compileDebugAidl' の実行に失敗しました。

java.lang.IllegalStateException: aidl is missing from '/Users/sachin/Library/Android/sdk/build-tools/26.0.2/aidl' * 試してください: --stacktrace オプションを指定して実行し、スタック トレースを取得してください。--info または --debug オプションを指定して実行し、より多くのログ出力を取得します。* https://help.gradle.orgで詳細なヘルプを入手してください BUILD FAILED in 1s Gradle build failed: 1 Exited (sigterm)

4

1 に答える 1

0

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:

  1. open terminal
  2. change directory to /Users/[USERNAME]/Library/Android/sdk/build-tools/, in your case, type cd /Users/sachin/Library/Android/sdk/build-tools/
  3. remove the folder that causes the error, in your case the 26.0.2 folder, so in your terminal type rm -r 26.0.2 to remove it.
  4. go back to your code, make sure the android simulator is detected, and re run the project
  5. now, wait patiently, it may takes sometime (depends on internet connection), but it's downloading the build tools, you can watch this in the finder by typing open .
  6. make sure that in the 26.0.2 folder there's aidl file added when the process is finished.
  7. it should be working, if not, just rebuild/re-run your code one more time. Done!
于 2018-04-10T20:36:23.287 に答える