Module 'flutter_keyboard_visibility' not found on IOS - android

This is a simple flutter project. Android version is running without any error.
But the Problem is in ios version. Here is the screenshot of the error.
I have removed the podfile and reinstall again. But no luck!!

Use Runner.xcworkspace instead of Runner.xcodeproj

I fixed the issue by removing the module from my pubspec.yaml and adding it again.
Clean derived data manually.
flutter pub get (without flutter_keyboard_visibility)
flutter clean
flutter pub get (uncomment to reinstall it)
pod install
Launch Runner.xcworkspace
Build & Run
EDIT: If your problem is with the archive and not the run. It seems that your minimum ios version is too old. Simply increase the minimum iOS version in Runner > Targets > Deployment Info
(For me, iOS 11 works).

Related

how to clear flutter project cache?

I am facing issues with my flutter project.
Earlier it was working , then I upgraded to the latest version, iOS App build issues occurred,then I downgraded the flutter version many other dependencies issues occurred.
I implemented a command flutter pub cache repair.
Please guide me a similar command to clean all the previous dependencies cache.
Please don't provide flutter clean, I already implemented it.
Delete the pubspec.lock file then run the command flutter pub get again.
You can empty the entire projects cache to reclaim extra disk space or remove problematic packages.
run flutter pub cache clean in terminal at project directory

Flutter SDK is not found Android Studio 3.5.3

I have updated my Android Studio, I am facing issue with flutter while creating new flutter project. I have set Environment Variable path as well as checked in cmd everything seems fine, but still it is giving error about Flutter SDK not found. Can any one suggest better solution for this issue ?
First, run flutter doctor, it should tell something, and if it doesn't, issue will probably be with gradle, updating gradle causes a lot of problem, i suggest you delete your gradle located at C:\Users***.gradle, or even the sdk and open android folder of a flutter app in android studio, and let the correct settings install, sync and setup..

Flutter: pub get failed (66)

When i try to implement scoped model, i get this error message:
[flutter_course] flutter packages get
Running "flutter packages get" in flutter_course...
Creation of temporary directory failed, path = 'C:\Program Files\flutter.pub-cache_temp\dir' (OS Error: Access is denied.
, errno = 5)
name: flutter_course
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
scoped_model: ^1.0.1
dev_dependencies:
flutter_test:
sdk: flutter
What worked for me is: flutter pub cache repair
reference
I FINALLY GOT THE SOLUTION
Hello guys I finally found a solution to this error.
So the problem is first caused because temporary files could not be created in the /bin or .pub-Cache
To fix this go to their respective folders which are in the flutter folder and the first start with the bin folder and change its security options to allow for ALL APPLICATION PACKAGES and then the .pub-Cache the same .
Run flutter doctor and if you get a license error just follow the steps given by flutter doctor and you are good to go.
Try to clean Flutter: flutter clean and then update pub with: flutter packages upgrade or update Flutter with: flutter upgrade.
This happens to be an active issue and the flutter team is currently working on it. The problem is specific to the Windows operating system. You can try the following workarounds for now:
1) Make sure your installation does not reside in any directory which requires special privileges like Program Files. If that's the case, you can try running it as admin for now but you should change your installation directory to a user's data directory as soon as possible (#Günter Zöchbauer has already pointed this out in the comments).
2) Try restarting your machine.
3) Try deleting the .dart_tools folder and also try clearing the cache in flutter/bin/cache
4) Try disabling your antivirus and/or windows defender temporarily (although it's not really possible for people working on corporate machines). This issue could have been caused by an active antivirus locking your files temporarily.
Enable in your windows settings the Developer Mode.
An easy solution that worked for me on Windows was to run Android Studio as administrator.
After that, the error no longer appeared.
If you have tried all answers here.
You should try this, it worked for me.
(in android studio) Delete the pubspec.lock file in your project.
(in android studio) Execute this-- Tools > Flutter > Flutter clean
Go to flutter sdk folder where you have downloaded it. In my case C:\src\flutter\
Run this below command.
C:\src\flutter\bin\cache\dart-sdk\bin>flutter pub cache repair
After completion run pub get again in your android studio. It should work.
Turning on developer mode solved my issue on Windows 10.
Delete temp folder in pub cache.
Do pub repair flutter pub cache repair.
Turn on developer mode in windows settings.
Flutter clean and delete pub.lock if exist.
Try flutter pub get.
This worked for me.
Because I switched the Flutter version, the following operation worked for me
flutter clean
flutter pub get
Update the Flutter sdk using : flutter upgrade.
And also scoped_model in this link scoped model is showing dart 2 incompatible
You get this error because "packages get" command attemp to delete file in ...flutter.pub-cache_temp. Delete files manually in this loction, this is may not perfect solutions but it's works.
Sometimes newly installed packages could cause this. Uninstall and install package again
I downloaded flutter sdk and extracted file in C:\FlutterDev\ and then start android studio
remember to provide flutter sdk path if you changed
I had a similar situation when I upgraded the flutter version to the new 2.2.
As a solution, I ran the command line as administrator (or terminal for linux users) in the Project folder and run the following commands:
flutter pub cache repair
2.flutter pub get
I have tried all the solutions mentioned above none worked for me.
Then I went to file(any .dart) which has dependency error then click on get dependency. it works for me.
I have tried
Flutter clean X
Flutter pub cache repair X
Add Security X
Delete Temp X
last ....
I just open the windows setting developer mode O
My solution was to run
flutter pub get
it in an external terminal not from android studio
Also I set windows as developer, I ran in terminal and turned developer mode on
start ms-settings:developers
not sure which one helped.
try this, it solved my error,
terminal->flutter clean, then flutter pub get after this you will get the reason for error ,
in my case i was using latest version of path dependencies(path ^1.8.3) but sdk depended on path ^1.8.2,
so i changed path dependency from path ^1.8.3 to path ^1.8.2, in pubspec.yaml and error solved...
In my case it was anti-virus, I turned it off for a few minutes it started working.

Can't run app with Instant Run on Android Studio 3.0

I've updated to Android Studio 3.0 and now I cannot run the app with Instant Run enabled.
I get 'Execution failed for task' due to a java.io.FileNotFoundException because it can't find the apk under
../build/intermediates/instant-run-resources/resources-production/
Any idea how to overcome this so that I can run the project with Instant Run?
I'm not sure where to find the missing apk file or how to change the path to look for it in.
Have your settings as below,
Otherwise try to clean and re-install (after uninstalling exsisting apk) application.
I found the problem and the solution.
In my case the cause was dexcount-gradle-plugin. The plugin is expecting that the package task produces an APK, but that is not true anymore on Instant Run. So they released a new version that disables the process when running with Instant Run.
So I just had to update dexcount to the latest version.
Configure your project for Instant Run
Android Studio enables Instant Run by default for projects built using Android plugin for Gradle 2.3.0 and higher.
Please checkout this LINK to configure your project for instant run.

Visual Studio 2015 Cordova error: Could not locate a deployable apk

I use Visual Studio 2015 to create Cordova project, but when I debug the solution, the VS told me:
Error DEP10402: Could not locate a deployable apk. You may need to build your project.
and I couldn't get any project apk.
Use Cordova CLI version 5.4.1 in config.xml platform tab.
This Error may occurred because of the incompatibility of cordova version,
check your installed cordova version bye entrig following
cordova -v
and make sure same version added to visual studio project, in config.xml -> platform -> cordova cli
I had the same issue with Visual Studio 2017 and Ionic 3. The cordova-cli 8 (if you use a global cordova-cli) copies the apk into another folder and hence VS doesn't find it. I added a copyapk script which is run after the build is completed.
https://github.com/hamburml/ionic3-vs2017-blank-template
it happened before with some versions of cordova-cli
try using 5.4.1 or 5.3.0
i experience this problem in 5.4.0 but it dose not appeared in 5.4.1
it seems that some cordova-cli versions did not use --release as it should be
How about try to clear solution from Project root and rebuild again.
Although it's an old question, in my case the problem was caused because of configuration name.
In my project I have several configuration names for different environments (local, dev, pro), when using one of this names, the problem occurs.
If configuration name is set to default "Debug" the error disappears, but then I lose easy environment configuration.
I had the issue and I finally manage to run my application after restarting my machine and avoiding to open any application. It looks like the problem does not arise when there's a lot of available memory...

Categories

Resources