Open X-Wei opened 4 years ago
Any updates on this issue ?
I´ve got the same error here. It seems the file is missing. Please have a look and include it or fix the issue. Thanks!
`Xcode's output: ↳ /Users/USER/_dev/flutter/.pub-cache/hosted/pub.dartlang.org/record_mp3-2.1.0/ios/Classes/RecordMp3Plugin.m:2:9: fatal error: 'record_mp3/record_mp3-Swift.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
`
I just tried to use this plugin again. When cloning the whole repo and using the 'example' folder, I can build and run the project on the iPhone! After changing the three 'Expanded' errors and replacing the widgets with simple Container for example.
If I comment the lines
record_mp3: path: ../
and use
record_mp3: ^2.1.0
at dependencies instead, the projects builds, but stops running. This is the only output when the white screen is shown:
2020-12-14 15:41:00.310271+0100 Runner[29032:9587742] Metal API Validation Enabled warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available. (lldb)
it worked for me. add "use_frameworks!" in Podfile
target 'Runner' do
use_frameworks! # add this
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
Thanks for your reply @zhetengxiang, but I´m still unable to get it working.
What I did: Clone your repo. Open the ‚example‘ in Android Studio. Then:
Then comment relative path to record_mp3 plugin and add ‚record_mp3: ^2.1.0‘ to dependencies like a normal plugin. App doesn’t work. The ‚use_frameworks!‘ Is already in your Podfile.
Error in Android Studio:
Xcode build done. 29,6s
Installing and launching...
(lldb) Process 32715 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x16f00bfe0)
frame #0: 0x00000001a3c57d70 libobjc.A.dylib`objc_storeStrong
libobjc.A.dylib`objc_storeStrong:
-> 0x1a3c57d70 <+0>: stp x22, x21, [sp, #-0x30]!
0x1a3c57d74 <+4>: stp x20, x19, [sp, #0x10]
0x1a3c57d78 <+8>: stp x29, x30, [sp, #0x20]
0x1a3c57d7c <+12>: add x29, sp, #0x20 ; =0x20
Target 0: (Runner) stopped.
Error in Xcode:
2020-12-15 08:37:00.076274+0100 Runner[32723:9850143] Metal API Validation Enabled
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
(lldb)
I´m working on a new M1 MacBook: MacBook-Air-von-Rainer:flutter_demo_recordmp3-2 rainermacbook$ flutter doctor -v [✓] Flutter (Channel unknown, 1.23.0-18.1.pre, on macOS 11.0.1 20B29 x86_64, locale de-DE) • Flutter version 1.23.0-18.1.pre at /Users/rainermacbook/_dev/flutter • Framework revision 198df796aa (9 weeks ago), 2020-10-15 12:04:33 -0700 • Engine revision 1d12d82d9c • Dart version 2.11.0 (build 2.11.0-213.1.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/rainermacbook/_dev/Android/sdk • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = /Users/rainermacbook/_dev/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.2, Build version 12B45b • CocoaPods version 1.10.0
[✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin installed • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available) • iPhone X (NAME) (mobile) • 651NUMBERS56e • ios • iOS 14.2
• No issues found!
Try to create new Flutter project with Swift support for iOS.
Got this error while trying to build iOS app via codemagic: