问题描述
我最近将Android工作室更新到Artic Fox 2020.3.1 Patch 1,并使用了最新的SDK版本(31)。更新工作室后,我现有的Ffltter项目构建失败,出现故障:Build失败,出现异常。在前缀为arm-linux-androideabi的ABI的NDK工具链文件夹中找不到工具链。请查看完整的日志。
完整日志
[+1608 ms] > Task :app:mergeDebugNativeLibs
[ ] > Task :app:stripDebugDebugSymbols FAILED
[ +95 ms] w: Detected multiple Kotlin daemon sessions at ..uildkotlinsessions
[ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[ ] Use '--warning-mode all' to show the individual deprecation warnings.
[ ] See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
[ ] 825 actionable tasks: 825 executed
[ ] FAILURE: Build failed with an exception.
[ ] * What went wrong:
[ ] Execution failed for task ':app:stripDebugDebugSymbols'.
[ ] > No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
[ ] * 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 3m 20s
[{"event":"app.progress","params":{"appId":"eaabc68f-7957-45d7-8e88-b20c2e5e0fe6","id":"0","progressId":null,"finished":true}}]
[ +690 ms] Exception: Gradle task assembleDebug failed with exit code 1
[ +3 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:563:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:91:3)
<asynchronous suspension>
[{"event":"app.stop","params":{"appId":"eaabc68f-7957-45d7-8e88-b20c2e5e0fe6"}}]
[ +13 ms] "flutter run" took 2,02,547ms.
[{"id":0,"error":"app 'eaabc68f-7957-45d7-8e88-b20c2e5e0fe6' not found","trace":"#0 AppDomain.stop (package:flutter_tools/src/commands/daemon.dart:709:7)
#1 Domain.handleCommand.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:220:34)
#2 new Future.sync (dart:async/future.dart:218:31)
#3 Domain.handleCommand (package:flutter_tools/src/commands/daemon.dart:218:5)
#4 Daemon._handleRequest (package:flutter_tools/src/commands/daemon.dart:144:28)
#5 _rootRunUnary (dart:async/zone.dart:1362:47)
#6 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#10 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
#11 _MapStream._handleData (dart:async/stream_pipe.dart:218:10)
#12 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
#13 _rootRunUnary (dart:async/zone.dart:1362:47)
#14 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#15 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#16 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#17 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#18 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
#19 _WhereStream._handleData (dart:async/stream_pipe.dart:195:12)
#20 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
#21 _rootRunUnary (dart:async/zone.dart:1362:47)
#22 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#23 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#24 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#25 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#26 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#27 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#28 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#29 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:155:13)
#30 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:130:5)
#31 StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)
#32 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#33 _rootRunUnary (dart:async/zone.dart:1362:47)
#34 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#35 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#36 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#37 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#38 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#39 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#40 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#41 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243:7)
#42 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:317:20)
#43 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310:5)
#44 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#45 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#46 _rootRunUnary (dart:async/zone.dart:1362:47)
#47 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#48 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#49 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#50 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#51 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)
#52 _StreamController._add (dart:async/stream_controller.dart:607:7)
#53 _StreamController.add (dart:async/stream_controller.dart:554:5)
#54 _Socket._onData (dart:io-patch/socket_patch.dart:2160:41)
#55 _rootRunUnary (dart:async/zone.dart:1370:13)
#56 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#57 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#58 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#59 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#60 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)
#61 _StreamController._add (dart:async/stream_controller.dart:607:7)
#62 _StreamController.add (dart:async/stream_controller.dart:554:5)
#63 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1696:33)
#64 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1208:14)
#65 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#66 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#67 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)
#68 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)
"}]
推荐答案
是因为安卓工作室的控制台日志更新错误。在将Android Studio更新到Artic Fox 2020.3.1 Patch 1并使用最新的SDK版本(31)后,我遇到了类似的问题。我用以下方法解决了这个问题-
第一步
转到android=>;gradle=>;wrapper=gradle-wrapper.properties文件并
distributionUrl=https://services.gradle.org/distributions/gradle-7.2-all.zip
与distributionUrl=https://services.gradle.org/distributions/gradle-{latest version}-all.zip
您可以通过以下链接找到最新版本
第二步
转到android=>;打开build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
...
}
使用最新版本更改
另一个简单的解决方案
在将工作室更新到更高版本后,创建一个样例颤动应用程序。然后运行示例应用程序-它将完美运行。
然后按照第一步和第二步,将该值替换为示例项目值。
如果上述解决方案不起作用,另一个解决方案
转到Android Studio中的文件=>;设置
转到已安装插件
转到颤动插件=>;卸载插件并重新安装-重新启动Studio
这篇关于颤动-在ABI的NDK工具链文件夹中找不到工具链的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!