Solved: Build failure of Xylophone project in The Complete 2020 Flutter Developer Bootcamp

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.

The Solution

  1. Run Xcode
  2. File – Open – [your project]/ios/Runner.xcodeproj
  3. File – New – File
  4. Select “Swift File”, click “Next”
  5. Click “Create”
  6. Click “Create Bridging Header”
  7. Click on “Runner” at the top left
  8. Click “Build Settings”
  9. Change “Always Embed Swift Standard Libraries” to “Yes”
  10. Now you can close Xcode and the app should build in Android Studio

5 thoughts on “Solved: Build failure of Xylophone project in The Complete 2020 Flutter Developer Bootcamp

  1. Kaoru

    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”
    Click “Create”
    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!

  2. Jimmy McKinney

    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!

    Cheers,
    Jimmy

Leave a Reply

Your email address will not be published. Required fields are marked *