audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

BUILD FAILED for XCode 12.4 running on MacOs 11.2 BUT works without issues on Android

Open sevriugin opened this issue 4 years ago • 7 comments

Build failed for XCode 12.4 running on MacOs 11.2 BUT works without issues on Android

Very simple program (Android Studio 4.2 Betta):

import 'package:flutter/material.dart';
import 'package:audioplayers/audio_cache.dart';

void main() => runApp(XylophoneApp());

class XylophoneApp extends StatelessWidget {
  final player = AudioCache();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: Container(
            child: FlatButton(child: Text('Play Sound'),onPressed: () {
              player.play('note1.wav');
            },),
          ),
        ),
      ),
    );
  }
}

name: xylophone
description: A new Flutter application.

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2
  audioplayers: ^0.17.3

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:

  uses-material-design: true

  assets:
    - assets/


Xcode's output: ↳ ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics' ld: warning: Could not find or use auto-linked library 'swiftDarwin' ld: warning: Could not find or use auto-linked library 'swiftMediaPlayer' ld: warning: Could not find or use auto-linked library 'swiftUIKit' ld: warning: Could not find or use auto-linked library 'swiftFoundation' ld: warning: Could not find or use auto-linked library 'swiftsimd' ld: warning: Could not find or use auto-linked library 'swiftCompatibility51' ld: warning: Could not find or use auto-linked library 'swiftMetal' ld: warning: Could not find or use auto-linked library 'swiftObjectiveC' ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation' ld: warning: Could not find or use auto-linked library 'swiftCompatibility50' ld: warning: Could not find or use auto-linked library 'swiftCoreImage' ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements' 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 'swiftDispatch' ld: warning: Could not find or use auto-linked library 'swiftAVFoundation' ld: warning: Could not find or use auto-linked library 'swiftCoreMedia' ld: warning: Could not find or use auto-linked library 'swiftCoreMIDI' ld: warning: Could not find or use auto-linked library 'swiftUniformTypeIdentifiers' ld: warning: Could not find or use auto-linked library 'swiftCoreAudio' ld: warning: Could not find or use auto-linked library 'swiftSwiftOnoneSupport' Undefined symbols for architecture x86_64: "nominal type descriptor for Foundation.NSKeyValueObservation", referenced from: _symbolic _____Sg 10Foundation21NSKeyValueObservationC in libaudioplayers.a(WrappedMediaPlayer.o) "type metadata accessor for Foundation.Notification", referenced from: reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed Foundation.Notification) -> () to @escaping @callee_unowned @convention(block) (@unowned __C.NSNotification) -> () in libaudioplayers.a(WrappedMediaPlayer.o) "static Foundation.Notification._unconditionallyBridgeFromObjectiveC(__C.NSNotification?) -> Foundation.Notification", referenced from: reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed Foundation.Notification) -> () to @escaping @callee_unowned @convention(block) (@unowned __C.NSNotification) -> () in libaudioplayers.a(WrappedMediaPlayer.o)

....

(__C.AVPlayer) -> ()) -> () in libaudioplayers.a(WrappedMediaPlayer.o) @nonobjc __C.AVPlayerItem.init(url: Foundation.URL) -> __C.AVPlayerItem in libaudioplayers.a(WrappedMediaPlayer.o) "_swift_bridgeObjectRetain", referenced from: _globalinit_33_26A4F4F1917E61CC91E7E09F8EAB0CFA_func3 in libaudioplayers.a(SwiftAudioplayersPlugin.o) audioplayers.SwiftAudioplayersPlugin.players.getter : [Swift.String : audioplayers.WrappedMediaPlayer] in libaudioplayers.a(SwiftAudioplayersPlugin.o) audioplayers.SwiftAudioplayersPlugin.players.setter : [Swift.String : audioplayers.WrappedMediaPlayer] in libaudioplayers.a(SwiftAudioplayersPlugin.o) audioplayers.SwiftAudioplayersPlugin.lastPlayerId.getter : Swift.String? in libaudioplayers.a(SwiftAudioplayersPlugin.o) audioplayers.SwiftAudioplayersPlugin.lastPlayerId.setter : Swift.String? in libaudioplayers.a(SwiftAudioplayersPlugin.o) audioplayers.SwiftAudioplayersPlugin.timeObservers.getter : [audioplayers.TimeObserver] in libaudioplayers.a(SwiftAudioplayersPlugin.o) audioplayers.SwiftAudioplayersPlugin.timeObservers.setter : [audioplayers.TimeObserver] in libaudioplayers.a(SwiftAudioplayersPlugin.o) ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 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.4.99. (in target 'Pods-Runner' 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.4.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.4.99. (in target 'audioplayers' 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.4.99. (in target 'Runner' from project 'Runner') 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.4.99. (in target 'Flutter' from project 'Pods')

Could not build the application for the simulator. Error launching application on iPhone 12 Pro Max.

sevriugin avatar Feb 01 '21 20:02 sevriugin

i got same problem

hsiaomingcheng avatar Mar 06 '21 15:03 hsiaomingcheng

I am having the same issue. Any solution yet?

pratikbaid3 avatar Apr 16 '21 12:04 pratikbaid3

i got same problem on Xocde 12.5

zilaiyedaren avatar May 10 '21 06:05 zilaiyedaren

i got same problem, v 0.19 v 0.10 - works

projectfebr avatar Jun 03 '21 20:06 projectfebr

me too

Herryjoeson avatar Jul 19 '21 07:07 Herryjoeson

Guys , Anyone find the solution ?

ZakariaRebouhi avatar Sep 23 '21 09:09 ZakariaRebouhi

Same issue here... When I try to build it with xCode, I get Module 'audioplayers' not found. Screen Shot 2022-03-01 at 12 20 17 PM

And with Android studio, here is the output:

Failed to build iOS app
Error output from Xcode build:
↳
    objc[21872]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x1f386f678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1084002c8). One of the two will be used. Which one is undefined.
    objc[21872]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x1f386f6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108400318). One of the two will be used. Which one is undefined.
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
    	/var/folders/4q/dypkywvx4q1rc0000gn/T/flutter_tools.bnx3kx/flutter_ios_build_temp_dirQGjmic/temporary_xcresult_bundle

    Undefined symbols for architecture arm64:
      "___gxx_personality_v0", referenced from:
          +[FlutterSound registerWithRegistrar:] in flutter_sound(FlutterSound.o)
          -[FlutterSoundPlayer startPlayerCompleted:duration:] in flutter_sound(FlutterSoundPlayer.o)
          -[FlutterSoundPlayer needSomeFood:] in flutter_sound(FlutterSoundPlayer.o)
          -[FlutterSoundPlayer updateProgressPosition:duration:] in flutter_sound(FlutterSoundPlayer.o)
          -[FlutterSoundPlayer audioPlayerDidFinishPlaying:] in flutter_sound(FlutterSoundPlayer.o)
          -[FlutterSoundPlayer pause] in flutter_sound(FlutterSoundPlayer.o)
          -[FlutterSoundPlayer resume] in flutter_sound(FlutterSoundPlayer.o)
          ...
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    /Users/user/StudioProjects/practo/ios/Pods/Pods.xcodeproj: 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 15.2.99. (in target 'FMDB' from project 'Pods')

    Result bundle written to path:
    	/var/folders/4q/dypkywvx4qg1rc0000gn/T/flutter_tools.bnx3kx/flutter_ios_build_temp_dirQGjmic/temporary_xcresult_bundle


Error (Xcode): Undefined symbol: ___gxx_personality_v0

Could not build the application for the simulator.
Error launching application on iPhone 11.

Seferi avatar Mar 01 '22 11:03 Seferi

Is it still failing with audioplayers: ^1.1.0 ?

Gustl22 avatar Sep 27 '22 13:09 Gustl22

Closing as stale.

Gustl22 avatar Nov 03 '22 08:11 Gustl22