Can't run on dart_vlc on Flutter 2.10.4 - flutter

dart_vlc (https://github.com/alexmercerind/dart_vlc) was compiling for macOS up to now, but after upgrading to Flutter 2.10.4 I receive this error while compiling:
[100%] Linking CXX static library libdart_vlc_core.a
[100%] Built target dart_vlc_core
Install the project...
-- Install configuration: ""
-- Installing: /Users/abd/gits/myflutter/macos/Pods/../Flutter/ephemeral/.symlinks/plugins/dart_vlc/macos/deps/lib/libdart_vlc_core.a
error: install_name_tool: can't open file: /Users/abd/gits/myflutter/macos/Pods/VLCKit/VLCKit.xcframework/macos-arm64_x86_64/VLCKit.framework/VLCKit (No such file or directory)

This is how I resolve this-
flutter clean on a project
update version of dart_vlc with latest one.
Now, try to build it again and it works.

Related

flutter No such module 'FBSDKCoreKit' error

I am a beginner at app development.
I am making an app with flutter, and the following error occurred while building with ios.
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2
Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm)
But I never installed the facebook_auth package.
There is no flutter_facebook_auth in my pubspec.yaml file either.
But I keep getting the above error. Is there any solution?
Thank you for reading.
===============================================================
I did
flutter clean -> flutter pub get -> cd ios -> pod install -> run
And following is the result
/Users/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:109:16: warning: unused variable 'swf' [-Wunused-variable]
const char swf[3] = {'F', 'W', 'S'};
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:110:16: warning: unused variable 'swc' [-Wunused-variable]
const char swc[3] = {'C', 'W', 'S'};
^
4 warnings generated.
warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64 ios-arm64_x86_64-simulator ios-arm64_x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
Command CompileSwift failed with a nonzero exit code
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
import FBSDKCoreKit
^
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
warning: Skipping duplicate build file in Copy Bundle Resources build phase: /Users//Downloads/GoogleService-Info.plist (in target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/ly/7jxqf41945g08nj820kfkblr0000gn/T/flutter_tools.QgWT3r/flutter_ios_build_temp_diruHeVSi/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code
Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2
Could not build the application for the simulator.
Error launching application on iPhone 12.
Pod install result is fine.
This is the part of the pod install result
=================================================
pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7 File contents:
facebookauth.swift file contents
===============================================
I found following-facebook auth related- messages when i run the app on real android device
error msg when running on android device
I resolve this error by doing
remove Podfile.lock and Pods
update Podfile with platform :ios, '12.0' and config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
pod install
I also set the iOS deployment target to be 12.0 in the PROJECT.
https://github.com/darwin-morocho/flutter-facebook-auth/issues/299
I modified my Podfile
platform :ios, '11.0'
and config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' (in my case, both version were not same. 11.0 <-> 9.0)
and the error changed like below:
FIRStorageTypedefs.h:29:19: note: declaration here is not visible
typedef NSString *FIRStorageHandle NS_SWIFT_NAME(StorageHandle);
So I did pod uninstall, update, install, update, install..... T___T
arch -x86_64 pod update
arch -x86_64 pod install
and change the version of these like this
firebase_auth: 4.1.0
firebase_core: 2.1.1
cloud_firestore: 4.0.3
firebase_storage: 11.0.3
firebase_messaging: 14.0.3
cloud_functions: 4.0.3
firebase_remote_config: 3.0.3
Addition:
my command line tools of Xcode are already installed
$xcode-select --install
error: command line tools are already installed
install ffi.. all failed
sudo arch -x86_64 gem install ffi
sudo arch -arm64 gem pristine ffi
Thanks to everyone
I had the same problem,
in the podfile was:
platform :ios, '13.0
...
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
in config.build_settings I changed the version from 9.0 to 13.0
and it helped

Flutter - reinstalling App causes build to crash

I'm working on an app idea and ran into an issue with shared_preferences. After trying out a couple of things I stumbled on a post on stackoverflow to delete the app and reinstalling it again. After uninstalling the app I tried to run
$ flutter run
again but it doesn't build.
Launching lib/main.dart on iPhone 13 mini in debug mode...
Running pod install... 937ms
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `shared_preferences_ios` from `.symlinks/plugins/shared_preferences_ios/ios`
Resolving dependencies of `Podfile`
I tried to clean the installation:
rm ios/Podfile
flutter pub upgrade
flutter pub run
cd ios
pod init
pod update
flutter clean && flutter run
on flutter pub run the script runs to another error: pub finished with exit code 64
On the app I have custom fonts, and images from the assets folder enabled. The only dependency I'm using is shared_preferences: ^2.0.12
I pasted the full log here: https://pastebin.com/5XyDT0PT
edit:
I tried to reinstall cocoapods but still get the same error message:
$ brew upgrade ruby
$ gem uninstall cocoapods
$ gem install cocoapods
anyone having simular issues?
I've had this error too. Learn to look at the error log outputs. I believe you need this command
gem install ffi
see here for more details:
How to resolve LoadError: cannot load such file -- ffi_c

win32 plugin build error in flutter_openvpn with Flutter 2.0 / Dart 12

I get this error when I build the app for iOS: Command PhaseScriptExecution failed with a nonzero exit code.
Screenshot of the build error in Xcode
This error is caused by an old version of the win32 package that uses Dart FFI in a way that was prohibited with the release of Dart 2.12.
To fix this, update the win32 package. If the package is a transitive dependency, you can use dependency_overrides.

"Flutter run" giving error in Mac OS once I change in pubpec.yaml file

Please check below error, I am getting below error once I did some changes in "pubspec.yaml" file.
When I initial setup the project It works, as I did some changes then I am getting below error.
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart
side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
Running Xcode build...
Xcode build done. 2.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Planning build
note: Constructing build description
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Looking forward for kind response.
You'll need to install the changes made to the pubspec file, you can do this by following either of the 3 options:
Install it
From the terminal: Run flutter pub get.
OR From Android Studio
Click Packages get in the action ribbon at the top of
pubspec.yaml.
OR From VS Code:
Click Get Packages located in right side
of the action ribbon at the top of pubspec.yaml.
Then run the following in the terminal:
sudo gem install cocoapods
terminal:
flutter pub get
or if you are using VSCode with the Flutter extension, you can simply do:
CMD + S on your pubspec.yaml file (saving the file automatically calls flutter pub get)
if the error persists, you can try
flutter clean
and then try "flutter pub get" again.
Thanks everyone for sharing your views.
Above issue has been fixed by below steps:
Open terminal
Run Below commands
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
CocoaPods will be available
Quit VC editor and reopen.
do flutter run
Above steps worked for me.
Thanks.

How to add a fork github package to the pubspec.yaml?

map_view plugin is no longer maintained and let users with problems if the min sdk is up to 28, so luckily Eimji fork a modified version of the package but it's only on github https://github.com/Eimji/flutter_google_map_view and not on https://pub.dartlang.org I search to add his fork to my pubspec.yaml.
I tried
flutter_google_map_view:
git://github.com/Eimji/flutter_google_map_view.git
Thank you
Update
I changed name by map_view it seems accepted ...
but when I use flutter_google_map_view I have
Error on line 1, column 7 of flutter_google_map_view\pubspec.yaml: "name" field doesn't match expected name "flutter_google_map_view".
I don't know why map_view "works" but not mapview ...So I don't know if it's really accepted or the great methode ...
So now I have other issue when I upload my local map_view package ...
* Error running Gradle:
Exit code 1 from: C:\Users\utilisateur\AndroidStudioProjects\nirbi\android\gradlew.bat app:properties:
WARNING: The specified Android SDK Build Tools version (25.0.3) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.2.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (25.0.3) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.2.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
WARNING: The specified Android SDK Build Tools version (25.0.3) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.2.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':map_view'.
> Failed to notify project evaluation listener.
> java.lang.AbstractMethodError (no error message)
I search buildToolsVersion '25.0.3 from my build.gradle file , but nothing like this. So I add buildToolsVersion '28.0.3' in build.gradle but have always the same error ...
Update
I remove all "buildToolsVersion '25.0.3'" it seem working and now I have this last issue :
* Error running Gradle:
Exit code 1 from: C:\Users\utilisateur\AndroidStudioProjects\nirbi\android\gradlew.bat app:properties:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':map_view'.
> Failed to notify project evaluation listener.
> java.lang.AbstractMethodError (no error message)
I think map_view is not correctly accepted ...
Update
Some suggestions to simply import this github package https://github.com/Eimji/flutter_google_map_view to pubspec.yaml ?
when I use
flutter_google_map_view:
git: git://github.com/Eimji/flutter_google_map_view.git
I have this error ...
Git error. Command: git clone --mirror git://github.com/munificent/map_view.git C:\Users\utilisateur\AppData\Roaming\Pub\Cache\git\cache\map_view-84b47933c6a730a2f0624a589576e53be480ad60
Cloning into bare repository 'C:\Users\utilisateur\AppData\Roaming\Pub\Cache\git\cache\map_view-84b47933c6a730a2f0624a589576e53be480ad60'...
Update
I tried my last chance ! import map_view: ^0.0.14 (no compatible android X) and add manualy all modification did by Eimji https://github.com/Eimji/flutter_google_map_view/commit/5b631c499783936dfc462039274a6f5c59323068#diff-7ae5a9093507568eabbf35c3b0665732
I have this error
* Error running Gradle:
Exit code 1 from: C:\Users\utilisateur\AndroidStudioProjects\nirbi\android\gradlew.bat app:properties:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':map_view'.
> Failed to notify project evaluation listener.
> java.lang.AbstractMethodError (no error message)
See https://www.dartlang.org/tools/pub/dependencies#git-packages
dependencies:
kittens:
git:
url: git://github.com/munificent/kittens.git
ref: some-branch
If pubspec.yaml is not in the root directory you can also specify a path
dependencies:
kittens:
git:
url: git://github.com/munificent/cats.git
path: path/to/kittens