I using library https://pub.dartlang.org/packages/flutter_launcher_icons run icon app. I also try flutter pub pub get and flutter pub pub run flutter_launcher_icons:main but in Android 9.0, I'm not found icon app which I using but only see the default flutter icon. How to fix it?
Related
I have been trying to build and run my Flutter app on the iOS device but I got this error:
Could not build the precompiled application for the device.
Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.
You can temporarily work around this issue by running:
flutter clean
Error launching application on Amani’s iPod touch.
I did all the steps in the link mentioned above but still get this error.
This is my flutter doctor result:
Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-x64, locale en-EG)
I am using Visual Studio Code 1.66.2 and Xcode 13.0.
Any suggestions?
I have a problem when i change the ios app icon in the flutter .
This is my icon configuration list.
This is my problem. The small icon cannot be replaced.
However, the icon of the app has been changed.
you could change the icon automatically by using this package: https://pub.dev/packages/flutter_launcher_icons
add the icon image to the assets folder,
then add this to your pubspec.yaml file
dev_dependencies:
flutter_launcher_icons: "^0.9.2"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon.png"
and run these commands in the terminal of your project
flutter pub get
flutter pub run flutter_launcher_icons:main
You just need to watch this tutorial.
https://www.youtube.com/watch?v=O9ChjwrZqns&t=458s
It teaches how to change the android and ios icon.
I am running a flutter app on the Android simulator successfully but when I run it on the iOS simulator the app opens to a white screen then crashes.
I have done all of the following about 10 times each.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
sudo xcodebuild -license
flutter update
flutter clean
xcode clean build folder
flutter build ios
flutter run
Remove the Pods folder and Podfile.lock files.
cd ios
pod deintegrate
cd ..
flutter clean
flutter build ios
Xcode 12.5.1
I also made sure Xcode Signing & Capabilities were set. I also stopped and removed all antivirus software.
It doesn't work by running debug and running via terminal ( flutter run --enable-software-rendering ) doesn't show any errors.
UPDATE:
Deleted the iOS folder and tried to run flutter create and now getting.
"No option specified for the output directory"
flutter create doesn't work.
Got the above flutter create working and now the app won't install on the Android device at all, where as it was working before flutter create was run (suggested below). Added memory and wiped Android simulator and still won't install on Android saying not enough memory. Deleting the ios folder and running "flutter create" was a disaster.
Rolling back to original code. Still stuck on not installing on iOS. It has to be something with Xcode.
I have tried so many ways and fixes but my app icon still not showing up. I'm using flutter and I used the flutter_launcher_icons package but still no use.
Here's my pubspec.yaml dev_depend:
dev_dependencies:
flutter_launcher_icons: "^0.7.3"
flutter_test:
sdk: flutter
and here the config:
flutter_icons:
android: "launcher_icon"
ios: "AppIcon"
image_path_ios: "assets/icon/icon.png"
image_path: "assets/icon/icon.png"
and here's my AppIcon file
This is my flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.20.0-1.0.pre.118, on Mac OS X 10.15.5 19F101, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 4.0)
[!] IntelliJ IDEA Community Edition (version 2018.2.5)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
This is my Asset Catalog App Icon looks like:
Thanks to #SamiHaddad, I missed setting the AppIcon to Asset Catalog App Icon Set Name in the general section of the Runner file in Xcode. This fixed my issue.
It is worked for me in iOS through manual changes when dependency not worked:-
I have generated app icon which required in manual icon changes through site
(appicon.co)
There I got zip file of Image in which I found a folder Assets.xcassets
after extracting the zip file
I found Appicon.appiconset inside the folder Assets.xcassets
I replaced that Appicon.appiconset folder to
iOS/runner/Assets.xcassets/Appicon.appiconset folder
Flutter pub get
Flutter Run
My Flutter application built on both an Android and iOS device prior. However since implementing the camera plugin, the application will no longer build on the iOS device.
So far I have tried:
Commenting out the use_frameworks! in the Podfile and tried both pod update and pod clean.
And adding the permissions into the iOS Info.plist file.
The code I'm running is just a default flutter application with a tab that contains the example code from https://pub.dartlang.org/packages/camera.
Flutter Doctor Output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-NZ)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] VS Code (version 1.31.0)
[✓] Connected device (2 available)
• No issues found!
Terminal Output:
Launching lib/main.dart on SM G950F in debug mode...
Initializing gradle... 1.6s
Resolving dependencies... 1.5s
Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Gradle task 'assembleDebug'... Done 1.7s
Built build/app/outputs/apk/debug/app-debug.apk.
Launching lib/main.dart on iPad in debug mode...
Automatically signing iOS for device deployment using specified development team
in Xcode project: J6K4CJXVB4
Starting Xcode build...
├─Assembling Flutter resources... 1.4s
└─Compiling, linking and signing... 1.2s
Xcode build done. 3.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/Name/Desktop/math_snap/ios/Runner/GeneratedPluginRegistrant.m
:6:9: fatal error: 'camera/CameraPlugin.h' file not found
#import <camera/CameraPlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the precompiled application for the device.
Error launching application on iPad.
2.5s
As you can see, it launches fine on my Android phone. However trying to run it on iOS does not work. Does anyone know how to fix this?
I would suggest to everyone who still has these issues to do the following steps:
Open the ios folder
Double click on the Runner.xcworkspace (NOT Runner.xcodeproj!)
Pod Install
Build
The problem is that the cam plugin isn't in the scope of the Runner.xcodeproj.
Did you updated your Info.plist for using the camera plugin? If not,
Add two rows to the ios/Runner/Info.plist:
one with the keyPrivacy - Camera Usage Descriptionand a usage description.
and one with the key Privacy - Microphone Usage Descriptionand a usage description.
Or in text format add the key:
<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSMicrophoneUsageDescription</key>
<string>Can I use the mic please?</string>
I had the same issue. I fixed by running pod install within my project's /ios directory
delete the podfile then flutter run again,the podfile will be auto generated again.
then build successful !!!