Flutter ios No podspec found for `flutter_keyboard_visibility_web` in - ios

Iam using Flutter in Mac -> Android studio and when I write pod install in the terminal. It show me
Analyzing dependencies
[!] No podspec found for `flutter_keyboard_visibility_web` in .symlinks/plugins/flutter_keyboard_visibility_web/ios`
Iam using flutter from one year ago, It is the first time it happen for me.
I cannot run the app. I dont have a plugin with this name flutter_keyboard_visibility_web in pubspec
How to fix it, thanks

The solution is:
1- Delete Podfile and Podfile.lock from ios folder
2- Flutter clean either from terminal
or from Android studio -> Tools -> Flutter -> Flutter Clean
3- Pod install
4- Run the app
The solution is here:
https://github.com/MisterJimson/flutter_keyboard_visibility/issues/52

I had the same issue, but I cleared cache on IntelliJ and it started working again.
To do this on IntelliJ:
From the main menu, select File | Invalidate Caches / Restart.
In the Invalidate Caches dialogue, select an invalidate the caches and restart the IDE.

Related

Flutter iOS App stuck or fails? What to Do?

What to do when the Flutter app gets stuck on launching or installing dependencies or it fails out of the blue. I have noticed this issue coming up more and more in iOS. Android has its own issues. but a basic flutter upgrade or flutter pub upgrade can cause a lot wastage in developer time as the app will refuse to Build after some of the previously mentioned actions.
Track the list of items one can do to fix the unexpected long build times and build failures
I have been working with flutter for a while and there are few things which I believe can be done to get out of a bad flutter build situation.
Problems being considered
Stuck on flutter clean.
Stuck on flutter run.
Build Failure on Flutter pub upgrade.
The below mentioned solutions were performed and it has solved the problems for me in the past and I very well understand this is not a very clear solution but it still would be worth trying as it solved the issue for me in most cases.
Listing down few of the commands or actions which helped me in solving the issues.
Note: These are mostly related to solving the issues in building on iOS
flutter upgrade.
flutter pub cache clean.
flutter pub cache repair
flutter clean.
Deleting .dart_tools
Deleting Runner.xcworkspace.
Deleting .symlinks
Deleting Pods/
pod deintegrate(inside iOS folder)
pod cache clean --all.
pod repo update
pod update
pod install
if nothing works then
update the bundle identifier.
Delete iOS folder, run flutter create app with the bundle id and copy the iOS folder to project

How can I fix "Checking Dart SDK version... << was unexpected at this time" error in Flutter?

I am facing an issue any time I try to run any app or flutter command from the terminal, this is displayed: Checking Dart SDK version... << was unexpected at this time.
Not even flutter doctor works.
Nothing seems to work and it's so frustrating as it happened out of the blue. One moment everything was fine, now nothing works. Any help will be appreciated
I've resolved this error with the below steps:
Go to C:\Users\{Name}\.gradle} - Delete the .gradle directory.
Then Download and install the same flutter and dart SDK version in some other location and set the environment variables.
Example:
Environment variables Before :
("D:\FlutterExtractedFiles\flutter\bin")
("D:\FlutterExtractedFiles\flutter\bin\cache\dart-sdk\bin")`
Environment variables After :
("C:\edgedownloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin")
("C:\edgedownloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin\cache\dart-sdk\bin")
Then check the Android Studio event log
I've resolved this error by following these steps:
Go to folder C:....\Flutter\
Run this command: git reset --hard HEAD
This will restore the flutter SDK folder to its original state, so no need to reinstall the SDK.
Flutter reinstalled worked for me..
delete flutter folder in C directroy.
make a src folder in C: directory.
GoTo cmd and install flutter from official flutter github repoC:\src>git clone https://github.com/flutter/flutter.git -b stable
https://flutter.dev/docs/get-started/install/windows
run flutter doctor
set env path.
DONE
What worked in my case was deleting the .gradle file (C:\Users\USER.gradle) and reinstalling Flutter in another location and changing the PATH to it.
you should try this
restart your pc and delete the flutter folder in C directory then reinstall flutter and run flutter doctor
For me, the following steps resolved the problem:
Open cmd and run flutter doctor. (if there is an issue resolve them first.)
If not then change the flutter channel to dev. Whatever your channel is?. If this is the dev channel then change to master channel.
Again flutter doctor. If everything goes perfectly. then run your project. If it runs accordingly then again change to channel to stable.
I faced this error before, all I had to do was to:
Remove Flutter from my C directory.
Install Flutter from the official website.
Run Flutter doctor: flutter doctor
No need for changing the PATH or any further actions.
If it worked fine with you then you are all done!
I faced another error after it, related to the Dart SDK and solved it using this link
the key is to install Android SDK Command-line Tools, steps being:
Open Android Studio Tools Menu, SDK Manager In the window that comes
up there are inner panels, choose SDK Tools panel Tick Android SDK
Command-line Tools Choose Apply button near the bottom of the window
At that point, you will be prompted to accept the SDK license and the
command line tools will be installed. Your license issue should now be
resolved.
If your using Intelij and get the << error and none of the above work.
Delete the .intelij folder in your project and reopen the folder in intelij.
I faced this problem too and I've solved it by downloading SDK file again.

importing "Module 'app_settings'" not found

I'm currently trying to work with xcode to test my flutter application with xcode. The big issue is that all of my imports (such as app_settings, cloud_firestore, etc...) give an error for "Module ___ not found". When I try to run my dart code I get the error in the terminal:
[Proj Root]/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'app_settings' not found
#import app_settings;
~~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I tried running flutter create for ios, (this might've made things worse?) Flutter clean and reinstalling pods doesn't seem to work either. I'm wondering if there's something simple that I missed with importing modules. I created the application on android using modules that should work with Android & iOS. After getting the android version working I pulled my project on my mac through github and finally reached this issue. Any pointers would be appreciated because I'm totally stuck on this.
My project has 3 build flavor. Development, Staging & Production.
In Xcode It was selected default Runner One. (On Top of the middle)
though i follow the process like
delete pod , Podfile.lock and .symlinks from Android Studio / (From Project)
flutter pub get
cd ios > pod install
Then In XCode > clean build
Select Right Build Flavor (Production For Me)
Then Archive (Done)
NB: I tested in M1 machine.
Hmm Not sure what happened but it seems to be good now. I think pod init was initializing minimal data for the podfile. Instead, I deleted the Pods file and did flutter run and it built the podfile correctly with flutter pub get.
Had the same problem, we solved it by setting the iOS Deployment target in XCode to the same value as set in the Podfile, which was 12.0. Then ran flutter clean and flutter build ios worked like a charm 🎉
I had this same problem. What I did was
Delete the Podfile and Podfile.lock
flutter clean
flutter build ios
Opened the Runner.xcworkspace
Build on Xcode
This worked for me 🎉
Delete pod directory and podfile.lock
flutter clean
flutter pub get
cd ios
pod install --repo-update
run the application in Xcode
I tried everything above, but for me the solution was quite different.
I am using flavors (schemes), and I accidentally created the scheme with upper case in the first character, while everywhere else (build config etc.) I used lower cases only. After deleting the scheme and recreating with lower case characters, it worked.
path/flutter/ios/Runner/GeneratedPluginRegistrant.m:12:9: Module 'app_settings' not found
I had the same issue after upgrading the Xcode to 13.3 and my production build flavor wasn't working. I was using firebase as well. In my production build flavor, I didn't append anything to the configuration name (i.e. all the other configurations have the name like "Debug-staging", "Debug-development", but in the production, it's only "Debug"). I just deleted the pod file and run:
flutter run --flavor production --target lib/main_production.dart
Everything worked fine for me.

Build fail for google-signin package in react-native?

I am trying to implement react-native-google-sigin package to my react-native Ios project . I have configured everything.
But now the problem if I include google framework to my project there is a pop an error and As soon as I remove it. It works!!
I really don't know why m getting build fail with the following error
Every time i include ios/GoogleSdk frameworks in my project.
I don't know why or how but I ran into this issue and after numerous cleans, DerivedData deletes etc., the solution that worked for me was to follow XCode's advice on upgrading to the recommended settings and changing the iOS Deployment Target of RNGoogleSignIn project to 8.0. I'm using XCode 9 if that helps.
This is how I solved this:
rm -rf node_modules/ ios/
(Copied my podfile to another location)
npm install & react-native upgrade
(this will give me a error free start cause by react-native link)
cp my podfile inside ios/ Pod install
Followed the remaining steps from react-native-google-signin
Added the following to my login.js (iosCLientId and CLientId are different Id's)
await GoogleSignin.configure({
iosClientId: 'iosClientId',
webClientId: 'webClientId',
offlineAccess: false
});
Open Xcode Clear and Build the project.
Note: I would have easily removed the googlesdk(frameworks), links and library . But instead I choose to get get a fresh start. Hope this helps anyone

Missing dependency target "CordovaLib (from CordovaLib.xcodeproj)"

Missing dependency target "CordovaLib (from CordovaLib.xcodeproj)" When running ios with Xcode
A different solution
Before reading this MAKE SURE you are opening YourProject.xcworkspace and NOT YourProject.xcodeproj
I couldn't get this to work using #manzapanza 's solution
The Problem
CordovaLib.xcodeproj is missing from your xcode project
Solution (for mac users)
Download a copy of CordovaLib.xcodeproj and drag it into your xcode project.
$ sudo npm install -g cordova (installs a "global" copy of cordova to your computer, you might be able to skip this step)
$ find ~/ -name 'CordovaLib.xcodeproj' (mine was at /Users/Jackson//.cordova/lib/npm_cache/cordova-ios/4.3.1/package/tests/spec/unit/fixtures/ios-config-xml/CordovaLib/CordovaLib.xcodeproj)
Open folder the folder path found above $ open [path] (open /Users/Jackson//.cordova/lib/npm_cache/cordova-ios/4.3.1/package/tests/spec/unit/fixtures/ios-config-xml/CordovaLib/)
Drag CordovaLib.xcodeproj to your xcode project
This is what your file navigator should look like at this point:
Delete red (missing) file
Select your app in the navigator (very top of file tree). Go to Targets > [Your Project Name] > Build Phases > Link Binary With Libraries > "+"
type in / look for libCordova.a and add it
Compile project
For some reasons the xcode project was corrupted. Generally, to solve this kind of problems, you can try removing and re-adding the platform ios:
ionic platform rm ios
ionic platform add ios
ionic build ios
Attention: Any changes that you applied directly from xcode will be lost and you will need to apply manually after you will have run these commands. Do a backup of platforms/ios before.
Same solution for Apache Cordova project.
Remove platform and re-add:
cordova platform remove ios
cordova platform add ios
cordova prepare ios
cordova run ios
Successful!
I downgraded my Cordova version to 6.2.0 and it started working.
I had multiple issues with my app that I was able to resolve when I was missing CordovaLib from my XCode project.
First I ran
cordova requirements ios
and found that I was missing ios-deploy and CocoaPods. These were not requirements for Cordova 6.2.0 but are as of Cordova 6.4.0. I did not try 6.3.0 so I do not know the status for that version.
In addition, I had some icon files in my config.xml for iOS that did not exist because I was using a 3rd party cordova-icon maker to generate them and the fact that they were missing was apparently breaking the add platform command mid-process. Again 6.2.0 did not have this issue with the same config file, but 6.4.0 is definitely strict about not having any errors. My guess is that they were either continuing past the errors in prior version of Cordova or they re-arranged the way things are built so that the CordovaLib is now last and if there are any errors before that step, you will be missing the folder and its contents.

Resources