美文网首页
The service is invalid. AMDevice

The service is invalid. AMDevice

作者: Crazy2015 | 来源:发表于2020-11-14 18:53 被阅读0次

解决升级Xcode12后,Android Studio运行Flutter无法唤起App

环境:本机软件配置:xcode 12,flutter 1.17.5

问题

使用Android Studio 在iPhone上运行flutter项目,可以成功安装,但无法唤起,报错如下:

AttributeError: 'NoneType' object has no attribute 'modules'
Traceback (most recent call last):
  File "/tmp/71352EC1-BEE8-4C32-9EDC-7D27213999CD/fruitstrap_2c4db4052f2a62369bfce67ba51c92f1688ee298.py", line 74, in safequit_command
    process = lldb.target.process
AttributeError: 'NoneType' object has no attribute 'process'

解决方案

brew install --HEAD ios-deploy


==> xcodebuild -configuration Release SYMROOT=build
==> xcodebuild test -scheme ios-deploy-tests -configuration Release SYMROOT=build
🍺  /usr/local/Cellar/ios-deploy/HEAD-a4d56c4: 5 files, 254.0KB, built in 30 seconds

覆盖:

将 /usr/local/Cellar/ios-deploy/HEAD-a4d56c4/bin/
覆盖flutter/bin/cache/artifacts/ios-deploy/

参考:
https://github.com/ios-control/ios-deploy/releases/tag/1.11.0-beta.1

https://fantashit.com/flutter-run-fails-xcode-12-fruitstrap-py-in-connect-command-process-lldb-target-connectremote-listener-connect-url-none-error-attributeerror-nonetype-object-has-no-attribute-connectremote/

===================================================================

image.png
Error launching app. Try launching from within Xcode via:
open ios/Runner.xcworkspace

Your Xcode version may be too old for your iOS version.
═══════════════════════════════════════════════════════════════════════════════════
2019-12-11 14:56:34.809 ios-deploy[66432:2876376] [ !! ] Error 0xe8000022: The service is invalid. AMDeviceSecureStartService(device, CFSTR("com.apple.debugserver"), NULL, &con)
Could not install build/ios/iphoneos/Runner.app on 584319f35bff0e6b9127fa572389aee5a3a4c615.
Try launching Xcode and selecting "Product > Run" to fix the problem:
  open ios/Runner.xcworkspace

出问题地方:
flutter/bin/cache/artifacts/ios-deploy/ios-deploy
解决方案:
1、更新flutter/bin/cache/artifacts/ios-deploy/ios-deploy里面的ios-deploy
ios-deploy升级地址:https://github.com/ios-control/ios-deploy/releases/tag/1.11.3
2、直接升级flutter版本

相关文章

网友评论

      本文标题:The service is invalid. AMDevice

      本文链接:https://www.haomeiwen.com/subject/roysuhtx.html