Today, I upgrade my project version from 3.3.x to 3.7.0. and it has error below.
Launching lib/main.dart on iPhone 14 Pro in debug mode...
Running pod install... 13.0s
Running Xcode build...
Xcode build done. 131.3s
Failed to build iOS app
Error (Xcode): ../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/material_with_modal_page_route.dart:4:1: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro.
How can I solve this problem... can anyone help?
modal_bottom_sheet: ^3.0.0-pre
Error: 'ModalBottomSheetRoute' is imported from both
'package:flutter/src/material/bottom_sheet.dart' and
'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
Hide all conflicting classes that you don't use, so that the Compiler
only sees the class it should use.
import 'package:flutter/src/material/bottom_sheet.dart' hide ModalBottomSheetRoute
import 'package:modal_bottom_sheet/src/bottom_sheet_route.dart';
or
Use "as" keyword to provide the name to the class you want to use.
Then use this name as a prefix of the class.
import 'package:flutter/src/material/bottom_sheet.dart' as otherName;
import 'package:modal_bottom_sheet/src/bottom_sheet_route.dart';
Related
Launching lib/main.dart on Gedo iPhone in debug mode...
Updating project for Xcode compatibility.
Upgrading Runner.xcscheme
Automatically signing iOS for device deployment using specified development team in Xcode project: xxxxx
Running pod install...
Running Xcode build...
Xcode build done. 91.5s
Failed to build iOS app
Could not build the precompiled application for the device.
Error (Xcode): lib/helper/notification_helper.dart:22:29: Error: Couldn't find constructor 'IOSInitializationSettings'.
Error launching application on Gedo iPhone.
flutter pub upgrade --major-versions
flutter clean
flutter pub get
cd ios && rm -f Podfile.lock
pod install --repo-update
You can enter to XCode and run application for the iPhone. You will get the same error. Then you need to tap error icon and it leads to signing page. Input correct variation and run from XCode again. When it runs then you can exit from XCode and run from Android Studio again.
Task :app:compileFlutterBuildDebug
../../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/material_with_modal_page_route.dart:4:1: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
import '../modal_bottom_sheet.dart';
^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/material_bottom_sheet.dart:28:13: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
.push(ModalBottomSheetRoute(
^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/material_bottom_sheet.dart:50:10: Error: A value of type 'Object?' can't be returned from an async function with return type 'Future<T?>'.
'Object' is from 'dart:core'.
'Future' is from 'dart:async'.
return result;
^
../../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/bar_bottom_sheet.dart:102:13: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
.push(ModalBottomSheetRoute(
^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib/src/bottom_sheets/bar_bottom_sheet.dart:125:10: Error: A value of type 'Object?' can't be returned from an async function with return type 'Future<T?>'.
'Object' is from 'dart:core'.
'Future' is from 'dart:async'.
return result;
^
Target kernel_snapshot failed: Exception
When I add syncfusion_flutter_pdfviewer package in yaml file I am getting the below error. can anyone tell me what is that error states ?
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.2.48-beta/lib/src/common/pdfviewer_plugin.dart:21:23: Error: Type 'Uint8List' not found.
CancelableOperation<Uint8List?>? _nativeImage;
^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.2.48-beta/lib/src/common/pdfviewer_plugin.dart:24:37: Error: Type 'Uint8List' not found.
After adding package, application should be compiled again.
Try running a command in terminal.
flutter run -d [device id]
UPDATE:
Also try to:
import 'dart:typed_data';
in a file where you are using syncfusion components.
The issue was also resolved for me by upgrading to the latest Flutter version (as of 22 October 2022).
Upgrade flutter to the latest version. This issue was solved after I upgraded to version 3.3.1.
When I start build the flutter 2.10.x project in macOS 12.4, shows error like this:
"af": 5 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib/main_pro.dart on iPod touch (7th generation) in debug mode...
Running Xcode build...
Xcode build done. 7.1s
Failed to build iOS app
Error output from Xcode build:
↳
2022-06-29 22:18:45.452 xcodebuild[24800:2158061] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-29 22:18:45.452 xcodebuild[24800:2158061] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-29 22:18:45.573 xcodebuild[24800:2158072] apply_selection_policy_once: avoid use of removable GPUs (via com.apple.dt.xcodebuild:GPUSelectionPolicy->avoidRemovable)
** BUILD FAILED **
Xcode's output:
↳
/Users/xiaoqiangjiang/source/reddwarf/frontend/cruise-open/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'device_info' not found
#import device_info;
~~~~~~~^~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Could not build the application for the simulator.
Error launching application on iPod touch (7th generation).
anyone facing the similiar problem? what should I do to fixed this problem?
When running the project on a simulator everything seems to work fine. Once i tried to deploy to an actual device I get the following error:
iOS Version - 13.0
Xcode Version - 11.3.1
Flutter Version - 1.12.13+hotfix.8
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...
Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)... 30.5s
Built to build/aot/.
warning: parsing line table prologue at offset 0x6f697463 found unsupported
version 0x00
warning: line table parameters mismatch. Cannot emit.
note: while processing
/Users/<Username>/Documents/flutter_test_app/build/aot/armv7/snapsho
t_assembly.o
Project /Users/<Username>/Documents/flutter_test_app built and
packaged successfully.
/Users/<Username>/Documents/flutter_test_app/ios/Runner/GeneratedPlu
ginRegistrant.m:10:9: fatal error: module 'flutter_web_auth' not found
#import flutter_web_auth;
~~~~~~~^~~~~~~~~~~~~~~~
1 error generated.
/Users/<Username>/Documents/flutter_test_app/ios/Runner/GeneratedPlu
ginRegistrant.m:10:9: fatal error: module 'flutter_web_auth' not found
#import flutter_web_auth;
~~~~~~~^~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error running application on iPhone.
Make sure you have added flutter we bauth dependency plugin in your pubspec.yaml
dependencies:
flutter_web_auth: ^0.1.3
If it's added and it still does not works, ensure also that the pod install works fine to add the plugin.
I'm getting a build error using the flutter speech_recognition package. Try to build for iOS right now. Haven't tested Android.
I followed the installation guide. The package seem to load after modifying the .yaml file. I'm using the Visual Studio IDE on a MacBook Pro.
Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done. 9.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET speech_recognition OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/abcdefg/Development/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SpeechRecognitionPlugin.m:2:9: fatal error: 'speech_recognition/speech_recognition-Swift.h' file not found
#import <speech_recognition/speech_recognition-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
From my dev directory. I can find speech_recognition directories, but the .h file is not anywhere to be found.
abcdefg-MacBook-Pro:Development abcdefg$ !find
find . -name speech_recognition
./learning_fluter/ios/Pods/Target Support Files/speech_recognition
./learning_fluter/ios/Pods/Headers/Public/speech_recognition
./learning_fluter/ios/Pods/Headers/Private/speech_recognition
./learning_fluter/ios/.symlinks/plugins/speech_recognition
./learning_fluter/build/ios/Debug-iphonesimulator/speech_recognition
abcdefg-MacBook-Pro:Development abcdefg$ find . -name speech_recognition-Swift.h
abcdefg-MacBook-Pro:Development abcdefg$
Any help would be appreciated!!
Make sure that the project has been created with the -i command as shown below: futter create -i swift [your_project_name].
after doing this verify that you are using in the properties of the runner SWIFT_VERSION = 4.2. since previous versions could cause this error.
And finally add below in podfile:
target 'Runner' do
use_frameworks!