Closed lijiee closed 3 years ago
any detail?
@lijiee
Can you provide flutter run --verbose
log in properly formatted text ? Please avoid providing screenshots.
Thanks.
I have same Error
Did you solve this problem?
Did you solve this problem?
No,I tried modify the flutter_tools/lib/ios/devices.dart localUri = await observatoryDiscovery.uri.timeout(const Duration(seconds: 30));
but It's not effective
I have same Error.
@lijiee
Can you provide pubspec.yaml
, ios/podfile
and a minimal code sample that we can use ?
Thanks.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, }
def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), FILE) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end
File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do use_frameworks! use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(FILE)) end
post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end
name: care_insure_audit_mobile description: A new Flutter application.
pub publish
. This is preferred for private packages.publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment: sdk: ">=2.9.0 <3.0.0"
dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter
cupertino_icons: ^1.0.0
image_pickers: ^1.0.8+7
json_annotation: ^3.0.1
get_storage: ^1.2.1
date_format: ^1.0.9
flutter_slidable: ^0.5.7
flutter_picker: ^1.1.0
flutter_easyloading: ^1.1.3
url_launcher: ^5.7.2
flutter_screenutil: ^5.0.0
fbutton: ^2.0.0
flutter_bmflocation: ^1.0.4 flutter_baidu_mapapi_utils: ^2.0.1 flutter_baidu_mapapi_map: ^2.0.1 flutter_baidu_mapapi_search: ^2.0.1
photo_view: ^0.11.1
scroll_to_index: 1.0.6
flutter_rating_bar: 4.0.0
flutter_html: 1.3.0
intl: ^0.17.0 benefit/
@lijiee Can you provide
pubspec.yaml
,ios/podfile
and a minimal code sample that we can use ? Thanks.
I have the same problem, I can’t run on AndroidStudio, but I can run on Xcode
@lijiee Can you try below commands and see if it helps ?
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org/
pod cache clean --all
flutter clean
flutter pub get
pod repo update
pod install
Thanks @darshankawar,It didn't solve my problem
@lijiee
Can you attach below files:
ios/Flutter/Generated.xcconfig
ios/Runner.xcodeproj/project.pbxproj
@darshankawar Thanks I tried it on four iMac computers and it didn't work xcconfig-pbxproj.zip
I see PhaseScriptExecution completed successfully as below from the verbose logs:
PhaseScriptExecution [CP]\ Copy\ Pods\ Resources
/Users/lijie/Library/Developer/Xcode/DerivedData/Runner-gfvjiiyevhoajggtnkcnopmdltec/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script
-85E3FB887796045F7410AF2B.sh (in target 'Runner' from project 'Runner')
cd /Users/lijie/Desktop/天津长护/fluttter_tjch/ios
/bin/sh -c
/Users/lijie/Library/Developer/Xcode/DerivedData/Runner-gfvjiiyevhoajggtnkcnopmdltec/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Sc
ript-85E3FB887796045F7410AF2B.sh
/Users/lijie/Desktop/天津长护/fluttter_tjch/ios/Pods/BaiduMapKit/BaiduMapKit/BaiduMapAPI_Map.framework/mapapi.bundle
building file list ... done
And seems to be failing at below:
[ +38 ms] (lldb) command script import "/tmp/1E5D8FBA-8D60-4370-81A0-270A9980E560/fruitstrap_00008101_001C11DA1452001E.py"
[ +4 ms] (lldb) command script add -f fruitstrap_00008101_001C11DA1452001E.connect_command connect
[ ] (lldb) command script add -s asynchronous -f fruitstrap_00008101_001C11DA1452001E.run_command run
[ ] (lldb) command script add -s asynchronous -f fruitstrap_00008101_001C11DA1452001E.autoexit_command autoexit
[ ] (lldb) command script add -s asynchronous -f fruitstrap_00008101_001C11DA1452001E.safequit_command safequit
[ ] (lldb) connect
[ +27 ms] (lldb) run
[ +249 ms] success
[ ] Application launched on the device. Waiting for observatory port.
[+30084 ms] Installing and launching... (completed in 60.5s)
[ ] Error launching application on iPhone.
[ +12 ms] "flutter run" took 121,845ms.
I didn't notice any obvious error / failure from the logs. Keeping this open for further insights from the team.
Cc: @jmagman
Hi @lijiee Please try the following solution from https://github.com/flutter/flutter/issues/72161#issuecomment-836854880
I had the Same issue after updating to 14.5.1, i fixed it with:
In XCode -> Preference -> Locations -> Derived Data, click the little arrow to open the path in finder and clean the folder. Then flutter run resume working normally.
The app builds fine but it fails to launch during connection to the observatory port
I see there's an open issue addressing the case you described. Please follow up on that issue, Closing as duplicate of https://github.com/flutter/flutter/issues/72161 If you disagree, please write in the comments and I will reopen it. Thank you
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Flutter Environment
My Application can run in Xcode but can't run Android Studio,