'Flutter/Flutter.h' file not found webview_flutter-1.0.7 - flutter

Please help me! I don't know what is that problem but I think is since I updated to the latest version of flutter.
I tried with , flutter clean, rm podfile, and more !! but I can't fix that ,is problem from flutter?
I have two days trying to repair it, but I have not been successful.
*I update all my pods, I did all!, but I can't do that work.. (flutter doctor its ok)
my flutter version is
**I tried that in channel stable too, but not worked.
Flutter 1.26.0-2.0.pre.157 • channel master • https://github.com/flutter/flutter.git
Framework • revision 4b83be6c23 (9 hours ago) • 2020-12-30 02:09:03 -0500
Engine • revision 0e5a25d779
Tools • Dart 2.12.0 (build 2.12.0-179.0.dev)
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
In file included from /Users/victormanuellagunas/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/victormanuellagunas/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-1.0.7/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

I had the same Problem and solved it with these Steps:
go to this Directory /Users/victormanuellagunas/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org
Delete the webview_flutter-1.0.7 Folder
Then run following command in project folder.
flutter pub get
If this is not working the try to use a lower Version for example 1.0.6

Related

Problems after upgrading to Flutter 2.5, Could not build the precompiled application for the device

I've been having problems since upgrading to flutter 2.5. I also tried flutter clean and rebooted. But it was not resolved. Ask for help!
I did a flutter run with my phone, but it didn't work.
> flutter run
Launching lib/main.dart on lswlsw in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: SWD9W7PNH2
Running pod install... 3.7s
Running Xcode build...
Xcode build done. 37.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mongol-2.2.0/lib/src/editing/text_selection/mongol_text_s
election_controls.dart:71:10: Error: The method 'MongolTextSelectionControls.buildHandle' has fewer positional arguments
than those of overridden method 'TextSelectionControls.buildHandle'.
Widget buildHandle(
^
../../../../Developer/flutter/packages/flutter/lib/src/widgets/text_selection.dart:123:10: Context: This is the overridden
method ('buildHandle').
Widget buildHandle(BuildContext context, TextSelectionHandleType type, double textLineHeight, [VoidCallback? onTap,
double? startGlyphHeight, double? endGlyphHeight]);
^
../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mongol-2.2.0/lib/src/editing/text_selection/mongol_text_s
election_controls.dart:109:10: Error: The method 'MongolTextSelectionControls.getHandleAnchor' has fewer positional
arguments than those of overridden method 'TextSelectionControls.getHandleAnchor'.
Offset getHandleAnchor(TextSelectionHandleType type, double textLineWidth) {
^
../../../../Developer/flutter/packages/flutter/lib/src/widgets/text_selection.dart:128:10: Context: This is the overridden
method ('getHandleAnchor').
Offset getHandleAnchor(TextSelectionHandleType type, double textLineHeight, [double? startGlyphHeight, double?
endGlyphHeight]);
^
Failed to package /Users/lsw/Desktop/FLUTTER/Geuloo/geuloo.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/lsw/Desktop/FLUTTER/Geuloo/geuloo/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in
target 'Toast' from project 'Pods')
Could not build the precompiled application for the device.
Error launching application on lswlsw.
Flutter 2.5.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cc385b4b8 (4 days ago) • 2021-09-07 23:01:49 -0700
Engine • revision f0826da7ef
Tools • Dart 2.14.0
You are getting this problem because of this package mongol You need to go to their issues section on github and file an issue report with this so that they fix their code to work with the new Flutter version.

Warning: Mapping new ns to old ns and emulator stopping abruptly

After upgrading to Arctic Fox , I am getting the following errors, even though the emulator is running but sometimes stopping abruptly.
What is this error ?
How can I get rid of this ?
I am using the following as copied from cmd :
> C:\Users\Debasis>flutter doctor Doctor summary (to see all details,
> run flutter doctor -v): [√] Flutter (Channel stable, 2.2.3, on
> Microsoft Windows [Version 10.0.19042.1165], locale en-IN) [√] Android
> toolchain - develop for Android devices (Android SDK version 31.0.0)
> [√] Chrome - develop for the web [√] Android Studio [√] Connected
> device (2 available)
• No issues found!
The Error :
Launching lib\main.dart on sdk gphone x86 in debug mode... Running
Gradle task 'assembleDebug'... Warning: Mapping new ns
http://schemas.android.com/repository/android/common/02 to old ns
http://schemas.android.com/repository/android/common/01 Warning:
Mapping new ns
http://schemas.android.com/repository/android/generic/02 to old ns
http://schemas.android.com/repository/android/generic/01 Warning:
Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02
to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns
http://schemas.android.com/sdk/android/repo/repository2/02 to old ns
http://schemas.android.com/sdk/android/repo/repository2/01 Warning:
Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02
to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 √
Built build\app\outputs\flutter-apk\app-debug.apk. Installing
build\app\outputs\flutter-apk\app.apk... Debug service listening on
ws://127.0.0.1:57467/XzCZTOeqyQs=/ws Syncing files to device sdk
gphone x86...
I had a similar issue. Two things did the trick for me.
Updated the gradle version in my gradle-wrapper.properties file to the latest available version
Updated the gradle plugin version in my /android/build.gradle file to the latest available version
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
/android/build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
}
Give these a try and see if it works!
I have also the same problem, when I was updated android studio. i research to fix that issue,
TODO ;
step 1 : GOTO project Folder
/android/build.gradle
to update a latest gradle version in dependencies.
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
}
step 2 :
/android/gradle/wrapper/gradle-wrapper.properties
here also to update a latest version of gradle
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
step 3: go to terminal and run flutter clean
step 4: and run flutter pub get
step 5: and run your project using flutter run command
one more think but that issue fix that project only. if u know fix that issue permanently please let me know,
I got the same problem, but after quick research, I managed to solve the problem.
step 1: Go to this webpage: Android Gradle plugin
step 2: Copy the build.gradle plugin to version
step 3: Go to your flutter app project and open the "build.gradle" file under
your_project>android
step 4: In that file edit dependencies.
classpath 'com.android.tools.build:gradle:<step 2 copied version>'
step 5: Now re-run your flutter app. You might see a new error, showing
A problem occurred evaluating project ':app'.
Failed to apply plugin 'com.android.internal.version-check'.
Now follow the instructions given in that error. (highlighted area in the image)

Warning: File C:\Users\UserName\.android\repositories.cfg could not be loaded. ( didn't work this command "flutter doctor --android-licenses")

I've been trying to solve this error since one day.
First I got this error
Exception: Android sdkmanager tool not found (/ usr / lib / android-sdk / tools / bin / sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.io/setup/#android-setup for detailed instructions.
Here is a Screenshot
I tried to solve this error but couldn't solve it and I deleted Android Studio completely (sdk, gradle, .android ... etc). I reinstalled and flutter I got this error when I wrote doctor. New errors Screenshot
C:\Users\Fatihh>flutter doctor --android-licenses
Warning: File C:\Users\Fatihh\.android\repositories.cfg could not be loaded.
4 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)?
C:\Users\Fatihh>
Finally I made the decision to write here. I need help.
Android studio version:4.1.1
OS :Win 10
Flutter SDK :1.22.5
Android SDK:30.3
First, open Android Studio and install Flutter and Dart plugins on it.
Then run the command flutter doctor --android-licenses
Finally, clean your project, make sure packages are installed and run it
flutter clean
flutter pub get
flutter run

Flutter doesn't launch the app after adding OneSignal. OneSignalNotificationServiceExtension is unknown to FrontBoard

Flutter can't launch my application after adding onesignal to my app. I've followed this guide. After managing all problems I got this one.
When I do flutter run I see the error below:
ProcessException: Process "/usr/bin/xcrun" exited abnormally:
<your-app>.OneSignalNotificationServiceExtension: -1
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "<your-app>.OneSignalNotificationServiceExtension" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application
"<your-app>.OneSignalNotificationServiceExtension" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn’t be completed. Application "<your-app>.OneSignalNotificationServiceExtension" is unknown to
FrontBoard.
Application "<your-app>.OneSignalNotificationServiceExtension" is unknown to FrontBoard.
Command: /usr/bin/xcrun simctl launch 26CD3C41-B2F7-4B59-9360-97C9688ABE38
<your-app>.OneSignalNotificationServiceExtension --enable-dart-profiling --enable-checked-mode --observatory-port=0
Error launching application on iPhone 8.
What I've tried:
Relaunching my emulator
Erasing all data on the emulator
Cleaning the build folder
OneSignal version: 1.0.5
flutter --version
Flutter 1.1.8 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 985ccb6d14 (6 weeks ago) • 2019-01-08 13:45:55 -0800
Engine • revision 7112b72cc2
Tools • Dart 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)
Go to iOS/Runner/Info.plist and set your bundleId in the section CFBundleIdentifier
Your bundle id is here. Copy it.
Paste bundleId into CFBundleIdentifier in the info.plist
Do the same actions in the iOS/OneSignalNotificationServiceExtension/Info.plist
I hope this helps. At least it worked for me.
Note:
BundleId of the OneSignalNotificationServiceExtension has a slightly different id. Check it in xcode before adding it to the .plist of OneSignalNotificationServiceExtension.
Facing the same issue.
ProcessException: ProcessException: Process "/usr/bin/xcrun" exited abnormally:
Failed to install the requested application
The application's Info.plist does not contain CFBundleVersion.
Ensure your bundle contains a CFBundleVersion.
Command: /usr/bin/xcrun simctl install 552DF0B1-4A65-46FE-8125-C2B37F3005DC/example/build/ios/iphonesimulator/Runner.app

Flutter app Error while initializing the Dart VM: Wrong full snapshot version, expected '8343.....' found '46b2....'

flutter app was working getting build and run on Xcode 10 on device iOS 12 fine before,
The time dart upgrade 2.1.0 happen in Flutter build iOS worked well with command and on Xcode 10 after build get success while running Flutter app on iPhone 7 iOS 12, it started giving error and app gets crash with following error message in Xcode logs.
Error is Runner[410:28754] [VERBOSE-3:dart_vm.cc(403)] Error while initializing the Dart VM: Wrong full snapshot version, expected '8343f188ada07642f47c56e518f1307c' found '46b2bfb57b5647c5f7527ff9aa56c69b'
Here are the details of the flutter sdk and dart .
Flutter 0.11.9 • channel beta • https://github.com/flutter/flutter.git
Framework • revision d48e6e4
Engine • revision 5c8147450d
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
I have experienced this error and none of the above solution worked for me infact the option of clearing the flutter/bin/cache messed the entire vscode IDE.
So I deleted the entire flutter SDK and installed fresh new SDK from flutter official website.
After this installation everything was working fine.
I had this issue after a flutter upgrade. Uninstalling the app from the device and then flutter running it again solved the problem.
After deleting the flutter/bin/cache and running flutter clean, I couldn't get the dart sdk to load until I launched the flutter console (flutter_console.bat) that can be found in the directory where you installed flutter and ran flutter doctor there. That solved the problem.
Do git clean -xffd in flutter installed directory(repo).
If it's a Flutter project first try flutter clean if did not work, try above git command.
If still not solved, delete everything inside /flutter/bin/cache and try.
If still not :D,
Do flutter channel master, flutter upgrade, and flutter clean. If nothing worked please add a comment below.
If you are in Dart environment out flutter/bin/cach/dart-sdk, you may be not upgraded dart-sdk. This happen to me Dart 2.5.0 with chololate installed. So I just did choco upgrade dart-sdk
I have exactly this problem i Solve it how ?
by these comments you just update flutter
flutter channel beta
,
flutter upgrade
you should upgrade your dart sdk
So try this command :
choco install dart-sdk
if this is not work for you download it from this link
https://dart.dev/tools/sdk/archive;
and replace it with your current dart-sdk in flutter
I also have experienced the same issue. I upgraded the flutter version and later downgraded and encounter this issue maily on IOS adhoc build.
Solution:
Delete out $FLUTTER_HOME/bin/cache and run flutter doctor.
This will solve.
What worked for me was changing channel and upgrading and then changing channel back and upgrading.
I had to remove the flutter SDK folder in my computer completely and redownload the latest one at https://flutter.dev/docs/get-started/install/macos
Then, I ran flutter doctor.
You can find where your flutter folder is by typing which flutter in your terminal.
You don't need to uninstall the whole flutter and set environment path or anything else.
Just downgrade to any version by doing the below commands, suppose my current flutter version is v3.3.8 and I come across this issue then:
Go to flutter sdk-path in the command prompt and checkout to any branch you would like to switch for a moment, like v2.5.0. So,
By doing this you changed your repository from v3.3.8 to v2.5.0
git checkout v2.5.0
You can check previous flutter versions from here
link
Downgrade your flutter version to 2.5.0
flutter downgrade v2.5.0
Then upgrade flutter
flutter upgrade