任务:flutter:compileflutterBuildReleaseArm失败

时间:2019-07-16 15:37:25

标签: android android-studio flutter

我有一个flutter模块,并将其嵌入到现有的android项目中。

我可以调试/运行android应用程序。但是,如果我尝试制作apk,则构建过程将失败,并遵循


> Task :flutter:compileflutterBuildReleaseArm FAILED

ProcessException: Bad CPU type in executable
  Command: /usr/local/custom/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --causal_async_stacks --deterministic --snapshot_kind=app-aot-elf --elf=/Users/johnnykuttymathew/Downloads/fix_try/flutter_module/.android/Flutter/build/intermediates/flutter/release/android-arm/app.so --strip --no-sim-use-hardfp --no-use-integer-division /Users/johnnykuttymathew/Downloads/fix_try/flutter_module/.android/Flutter/build/intermediates/flutter/release/android-arm/app.dill
#0      runCommandAndStreamOutput (package:flutter_tools/src/base/process.dart:142:27)
<asynchronous suspension>
#1      GenSnapshot.run (package:flutter_tools/src/base/build.dart:75:12)
#2      AOTSnapshotter.build.<anonymous closure> (package:flutter_tools/src/base/build.dart:164:27)
#3      AOTSnapshotter._timedStep (package:flutter_tools/src/base/build.dart:295:33)
<asynchronous suspension>
#4      AOTSnapshotter.build (package:flutter_tools/src/base/build.dart:163:13)
<asynchronous suspension>
#5      BuildAotCommand.runCommand (package:flutter_tools/src/commands/build_aot.dart:146:56)
<asynchronous suspension>
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:477:18)
<asynchronous suspension>
#7      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:383:33)
<asynchronous suspension>
#8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#9      _rootRun (dart:async/zone.dart:1124:13)
#10     _CustomZone.run (dart:async/zone.dart:1021:19)
#11     _runZoned (dart:async/zone.dart:1516:10)
#12     runZoned (dart:async/zone.dart:1463:12)
#13     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#14     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:375:20)
#15     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#16     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
<asynchronous suspension>
#17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#18     _rootRun (dart:async/zone.dart:1124:13)
#19     _CustomZone.run (dart:async/zone.dart:1021:19)
#20     _runZoned (dart:async/zone.dart:1516:10)
#21     runZoned (dart:async/zone.dart:1463:12)
#22     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#23     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#24     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#25     new Future.sync (dart:async/future.dart:224:31)
#26     CommandRunner.run (package:args/command_runner.dart:112:14)
#27     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#28     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:22)
<asynchronous suspension>
#29     _rootRun (dart:async/zone.dart:1124:13)
#30     _CustomZone.run (dart:async/zone.dart:1021:19)
#31     _runZoned (dart:async/zone.dart:1516:10)
#32     runZoned (dart:async/zone.dart:1500:12)
#33     run.<anonymous closure> (package:flutter_tools/runner.dart:60:18)
<asynchronous suspension>
#34     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#35     _rootRun (dart:async/zone.dart:1124:13)
#36     _CustomZone.run (dart:async/zone.dart:1021:19)
#37     _runZoned (dart:async/zone.dart:1516:10)
#38     runZoned (dart:async/zone.dart:1463:12)
#39     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#40     runInContext (package:flutter_tools/src/context_runner.dart:57:24)
<asynchronous suspension>
#41     run (package:flutter_tools/runner.dart:51:10)
#42     main (package:flutter_tools/executable.dart:63:9)
<asynchronous suspension>
#43     main (file:///usr/local/custom/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#44     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#45     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

50 actionable tasks: 10 executed, 40 up-to-date
17:31:33: Task execution finished 'assemble'.

我尝试通过创建android和flutter项目来使用一个示例项目,并使用它们。它也失败。

我正在macOS Catalina,Flutter Channel master,v1.8.2-pre.42上运行。

0 个答案:

没有答案