Closed
Description
Steps to Reproduce
- Create a new project using
flutter create
. - Add
assets_audio_player: ^2.0.13+1
to the pubspec.yaml file. - Run
flutter run
Expected results: The app to run on my iOS device
Actual results: The app crashes
Logs
Launching lib/main.dart on iPhone 12 Pro in debug mode...
Running Xcode build...
Xcode build done. 5.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from
/Users/arhanbusam/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferen
ces-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.m:5:
/Users/arhanbusam/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferen
ces-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.h:5:9: fatal error:
'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from
/Users/arhanbusam/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1
.6.27/ios/Classes/FLTPathProviderPlugin.m:5:
/Users/arhanbusam/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1
.6.27/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error:
'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/assets_audio_player_web-umbrella.h"
^
/Users/arhanbusam/Dropbox/Documents/Arhan-Flutter/simple_exercise_timer/ios/
Pods/Target Support
Files/assets_audio_player_web/assets_audio_player_web-umbrella.h:13:9: note:
in file included from
/Users/arhanbusam/Dropbox/Documents/Arhan-Flutter/simple_exercise_timer/ios/
Pods/Target Support
Files/assets_audio_player_web/assets_audio_player_web-umbrella.h:13:
#import "AssetsAudioPlayerWebPlugin.h"
^
/Users/arhanbusam/flutter/.pub-cache/hosted/pub.dartlang.org/assets_audio_pl
ayer_web-2.0.13+1/ios/Classes/AssetsAudioPlayerWebPlugin.h:1:9: error:
'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^
<unknown>:0: error: could not build Objective-C module
'assets_audio_player_web'
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/rate_my_app-umbrella.h"
^
/Users/arhanbusam/Dropbox/Documents/Arhan-Flutter/simple_exercise_timer/ios/
Pods/Target Support Files/rate_my_app/rate_my_app-umbrella.h:13:9: note: in
file included from
/Users/arhanbusam/Dropbox/Documents/Arhan-Flutter/simple_exercise_timer/ios/
Pods/Target Support Files/rate_my_app/rate_my_app-umbrella.h:13:
#import "RateMyAppPlugin.h"
^
/Users/arhanbusam/flutter/.pub-cache/hosted/pub.dartlang.org/rate_my_app-0.7
.2/ios/Classes/RateMyAppPlugin.h:1:9: error: 'Flutter/Flutter.h' file not
found
#import <Flutter/Flutter.h>
^
<unknown>:0: error: could not build Objective-C module 'rate_my_app'
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is 9.0 to
14.3.99. (in target 'path_provider' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is 9.0 to
14.3.99. (in target 'assets_audio_player_web' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is 9.0 to
14.3.99. (in target 'assets_audio_player' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is 9.0 to
14.3.99. (in target 'shared_preferences' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is 9.0 to
14.3.99. (in target 'rate_my_app' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is 9.0 to
14.3.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
darshankawar commentedon Jan 19, 2021
@arbusam
assets_audio_player
is a 3rd party plugin. Please open this issue in plugin owner's repo: https://github.com/florent37/Flutter-AssetsAudioPlayer/issuesClosing from here.
If you disagree, or think this is a Flutter framework issue and not 3rd party issue, write in comments and I'll reopen it.
arbusam commentedon Jan 19, 2021
@darshankawar
This issue happens for any plug-in that I use.
darshankawar commentedon Jan 20, 2021
@arbusam
Can you try below commands and see if they help:
arbusam commentedon Jan 20, 2021
@darshankawar
Now I get a different error saying the pod spec is not found.
darshankawar commentedon Jan 21, 2021
What does
Flutter
represent in your podfile ? It usually is a plugin.Can you run
flutter clean
orflutter pub cache repair
and try again ?Can you also try to create a new fresh project and run to see if you get same error for it ?
arbusam commentedon Jan 21, 2021
flutter clean
andflutter pub cache repair
do not fix the problem. When I create a new project and run it I get the following error.darshankawar commentedon Jan 22, 2021
@arbusam
The error says:
Do you have
example
folder in your project and you are running from that path ?Do you have
Podfile
in your project ? ios/podfile ?Can you provide
pubspec.yaml
?arbusam commentedon Jan 23, 2021
I created a new project called
example
and the logs are for that project.There is no
Podfile
in my ios folder.My
pubspec.yaml
file is at https://www.dropbox.com/s/v73gbrut6hlxcwt/pubspec.yaml?dl=0darshankawar commentedon Jan 26, 2021
Reopening and labeling this since the main issue seems to be following:
Which is similar to #42498 but was closed due to inactivity.
arbusam commentedon Jan 26, 2021
This is the new project I created: https://github.com/arbusam/example
jmagman commentedon Feb 23, 2021
User is on 7891006 based on that example project metadata.
I just tried it on that commit and the example project worked on my setup:
jmagman commentedon Feb 24, 2021
@arbusam
flutter run
log with the--verbose
flag? It's large so you'll need to attach it.flutter doctor --verbose
ls -la <path/to/flutter-sdk>/bin/cache/artifacts/engine/ios/
arbusam commentedon Mar 16, 2021
I have upgraded to Xcode beta and iOS 14.5 and it works now. I would say to anyone else who has this issue to just update their Xcode and iOS version. I think it is safe to close this issue now.
mhabashy commentedon Jun 1, 2021
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.4 20F71 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)
• No issues found!
Hello I have the same issue wondering if installing the beta is the best solution
any help will be greatly appreciated
-I/Users/habashy/Library/Developer/Xcode/DerivedData/Runner-gfixyrqmotsyorcunhnbrizsbqpv/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/DerivedSources-normal/x86_64 -Xcc
-I/Users/habashy/Library/Developer/Xcode/DerivedData/Runner-gfixyrqmotsyorcunhnbrizsbqpv/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/DerivedSources/x86_64
-Xcc
-I/Users/habashy/Library/Developer/Xcode/DerivedData/Runner-gfixyrqmotsyorcunhnbrizsbqpv/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/DerivedSources -Xcc
-DDEBUG=1 -Xcc
-DCOCOAPODS=1 -target-sdk-version 14.5 -serialize-diagnostics-path
/Users/habashy/Library/Developer/Xcode/DerivedData/Runner-gfixyrqmotsyorcunhnbrizsbqpv/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-2HMDNKUB774XR.dia
/Users/habashy/Desktop/suscopts/suscoptsflutter/suscoptsportal/ios/Runner/Runner-Bridging-Header.h -emit-pch -pch-output-dir
/Users/habashy/Library/Developer/Xcode/DerivedData/Runner-gfixyrqmotsyorcunhnbrizsbqpv/Build/Intermediates.noindex/PrecompiledHeaders
/Users/habashy/Desktop/suscopts/suscoptsflutter/suscoptsportal/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from
/Users/habashy/Desktop/suscopts/suscoptsflutter/suscoptsportal/ios/Runner/Runner-Bridging-Header.h:1:
#import "GeneratedPluginRegistrant.h"
^
/Users/habashy/Desktop/suscopts/suscoptsflutter/suscoptsportal/ios/Runner/GeneratedPluginRegistrant.h:8:9: error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^
1 error generated.
:0: error: failed to emit precompiled header
'/Users/habashy/Library/Developer/Xcode/DerivedData/Runner-gfixyrqmotsyorcunhnbrizsbqpv/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_3JTKNPAW42V5P-clang_1REEOC79ZZG84.pch' for
bridging header '/Users/habashy/Desktop/suscopts/suscoptsflutter/suscoptsportal/ios/Runner/Runner-Bridging-Header.h'
/Users/habashy/Desktop/suscopts/suscoptsflutter/suscoptsportal/ios/Runner/Runner-Bridging-Header.h:1:9: note: in file included from
/Users/habashy/Desktop/suscopts/suscoptsflutter/suscoptsportal/ios/Runner/Runner-Bridging-Header.h:1:
#import "GeneratedPluginRegistrant.h"
^
2 errors generated.
of supported
deployment target versions is 9.0 to 14.5.99. (in target 'Flutter' from project 'Pods')
[+6802 ms] Could not build the application for the simulator.
[ +3 ms] Error launching application on iPhone 12 Pro Max.
[ +3 ms] "flutter run" took 55,006ms.
[ +5 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:663:9)
#2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
#3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)
#5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
#8 run.. (package:flutter_tools/runner.dart:62:9)
#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)
#10 main (package:flutter_tools/executable.dart:91:3)
github-actions commentedon Aug 1, 2021
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.