-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error in macos Android Studio and temporary fix #27
Comments
I have tested with s.vendored_frameworks = '"third/cef/Chromium Embedded Framework.framework"'. It is the reason caused the error2 you mentioned above. Leave s.vendored_frameworks = 'third/cef/Chromium Embedded Framework.framework' as it is, delete 'Podfile.lock' and execute flutter clean in example folder, it works as intended. The framework file will be copy to app bundle automatically. |
i got this error but when i run the new example there is no error. |
after read this |
Clearing Other Linker Flags is causing problems with some plugins, for example with Launching lib/app/main.dart on macOS in debug mode...
Running pod install...
Building macOS application...
ld: warning: ignoring duplicate library '-lc++'
ld: warning: duplicate -rpath '/usr/lib/swift' ignored
ld: warning: duplicate -rpath '@executable_path/../Frameworks' ignored
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
_FIRConsentStatusDenied, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
_FIRConsentStatusGranted, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
_FIRConsentTypeAdStorage, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
_FIRConsentTypeAnalyticsStorage, referenced from:
-[FLTFirebaseAnalyticsPlugin setConsent:withMethodCallResult:] in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
_OBJC_CLASS_$_FIRAnalytics, referenced from:
in firebase_analytics[4](FLTFirebaseAnalyticsPlugin.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
Exception: Build process failed
|
I've fixed it locally without clearing Other Linker Flags using this quick and dirty Dart script: import 'dart:io';
// Fix for package:webview_cef, see https://github.com/hlwhl/webview_cef/issues/27
void main() {
const List paths = [
'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig',
'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig',
'macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig',
];
for (final path in paths) {
File(path).writeAsStringSync(
File(path)
.readAsStringSync()
.replaceAll('-ObjC Embedded Framework ', '')
.replaceAll('-framework "Chromium"', '-framework "Chromium Embedded Framework"'),
);
}
} Assuming you will put this in |
Did not work for me, do you have any solutions or possible reasons? I checked manually and did not see any of the replaced values in those files. @adrianjagielak |
What is your current content of macos/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig? |
I'm sorry for the late late response but I just wanted to write this to clear up any doubts that may arise in the minds of those who will read it. I do not know what was the problem at that time but currently, I do not have any problem. Replacing the following (just as you did in your dart script) works without any problem for me also:
|
after read #11, i will update this, update 30 nov 2022,
error :
u must clear "other linker flags" in Runner.xcodeproj
The text was updated successfully, but these errors were encountered: