I’m really enjoying The Complete 2020 Flutter Development Bootcamp with Dart on Udemy by Angela Yu and London App Brewery. I like how Angela has organized the progression of concepts and challenges. It’s also easy to skip lectures if you’re already an experienced programmer and don’t need to learn concepts like data types and function syntax.
My first big snag came when I added the audioplayers package to the Xylophone project. The run tab fills up with errors, ending with:
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Right above that was a bunch of errors like this, which actually sent me down the wrong path investigating this:
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.2.99. (in target 'Pods-Runner' from project 'Pods')
Scrolling to the top of the window, I found:
Error output from Xcode build: â†³ ** BUILD FAILED **Xcode's output: â†³ ld: warning: Could not find or use auto-linked library 'swiftCore' ld: warning: Could not find or use auto-linked library 'swiftQuartzCore' ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics' [lots more like this]
Googling these messages led to more useful solutions. The best I found was here: https://stackoverflow.com/questions/50096025/it-gives-errors-when-using-swift-static-library-with-objective-c-project/50495316#50495316, and I figured it might help someone if I provide updated instructions and a screenshot from Xcode 12.
- Run Xcode
- File – Open – [your project]/ios/Runner.xcodeproj
- File – New – File
- Select “Swift File”, click “Next”
- Click “Create”
- Click “Create Bridging Header”
- Click on “Runner” at the top left
- Click “Build Settings”
- Change “Always Embed Swift Standard Libraries” to “Yes”
- Now you can close Xcode and the app should build in Android Studio
thanks, i solved problem! very very thanks
Thank you, Karl, I ran into the same problem, and you helped me to solve this!
One thing that I needed to do extra is this;
> Select â€œSwift Fileâ€, click â€œNextâ€
> Click â€œCreateâ€
After these steps, I did not get prompted to this option ‘Click â€œCreate Bridging Headerâ€’. I followed all the other steps but the problem remained.
So in addition to what you instructed, I also did the following, and it worked.
Select â€œSwift UI Fileâ€, click â€œNextâ€
Then I can do ‘Click â€œCreate Bridging Headerâ€’ which I chose yes.
I hope this extra piece of information may help someone like me.
Thanks again, Karl!
Thanks for the extra info, Kaoru! Iâ€™m glad my blog post helped.
Thanks a lot, Karl! It worked for me!
Thanks so much for posting this up Karl! I’m taking the course right now and got stuck on this part for a couple days. Finally after searching I came across this article and even better it was specifically catered to the course content. Looks like others are having the same issue too, so I sent the link to the London App Brewery team so they can hopefully update their course and maybe link to this troubleshooting guide for people like us who got stuck. Super excited to continue my Flutter + Dart journey now that that’s out of the way!