Cannot create a flutter app using flutter create - flutter

When i run flutter create I get
Im not sure why that png is a sticking point everything above it are in the same parent folders. Has anyone run into this issue?The Programming Flutter folder seems like it is being set as read only:
But when i uncheck the Read only box and click apply when i open it again its set to Read Only again. But thats the very parent folder and other files seem to copy across fine before the error above.
Anyone have any idea why its failing?

Have you recently updated your Flutter version, or are you running on an older version? As per this thread, it seems to have been fixed somewhere in 2020.

It is your operating system not allowing Flutter to write files.
You can either delete that folder and create that again or change permissions. Uncheck that 'read-only' checkbox shown in picture.
You can learn more about handling permissions here.

Related

Flutter Resolves to Wrong Path

I'm not really sure what I did, but it seems like I ended up making the path of flutter split into two different places, and the flutter SDK Checkout is not in the right one. I've been trying for hours to fix it. This is what flutter doctor shows. My Flutter Doctor. Also, here is my .zshrc file..zshrc
So far, I've tried editing the path using export PATH="$PATH:pwd/flutter/bin"
I've also edited the .zschrc file to change the path there, and I've once tried PATH="$PATH:/Users/artemis1/applications/flutter/bin, but so far, the same warning still shows up.
If you want to update $PATH according to the warning message, you will have to put the desired path in front of the existing $PATH.
That is
export PATH="/Users/artemis1/applications/flutter/bin:$PATH"
The paths inside $PATH are used in the order they are listed.
Aside from that you will probably want to maintain only one installation of flutter and delete the other.

Xcode Build Fails on Archive, but the Build does not Fail on Run with ResearchKit

What I am trying to achieve is to archive the app and still have a working consent form on the app.
Although this piece of code is deprecated and says to use ORKInstructionStep I haven't found anywhere how to use ORKInstructionStep instead of ORKVisualConsentStep.
Whenever I try to Archive the app I keep getting this problem. Still, I also can't remove the ORKVisualConsentStep because I haven't been able to find anywhere how to add the consentDocument otherwise.
I've looked at so many other tutorials and all of them use the ORKVisualConsentStep and haven't seen anyone that has had this problem show how to still keep the consent form working. I can get the app running on a phone but I can't get it to archive so not entirely sure what is going on.
Any insight would be beneficial thank you
If you don't know how to added all frameworks, libraries and Embedded contents then you can find shown below what I shared and you can remove it. Please check after your local files remove it.
I managed to fix the problem by using cocoapods to install the ResearchKit framework instead of dragging ResearchKit into my project. It now archives however I had to comment out this line of code instructionStep.imageContentMode = .scaleAspectFit for my survey tasks.

Issue with errors in Unity on launch

I am having an issue in Unity where every time I launch the editor it asks me to enter in safe mode because there are a lot of errors and when I press ignore it launches and I can see in the console a lot of errors with the UI and I found out that I cant create UI elements directly in the hierarchy. I tried to update from 2020.3.13f1 to 2020.3.14f1 and for the first launch everything was fine, with no errors, and I could create UI elements but then when I restarted to make sure everything was actually fine, all the errors popped up again and I cant create UI. Why does this happen and does anyone have a fix because I can't find it anywhere online.
Try not to enter Safe Mode. Enter the editable project. There go to Assets-Reimport All.
It did it to me too, it's probably a Unity bug, this method fixes it. Practically it reimports the whole project by itself, avoiding that the bug gives you problems (such as those like UnityEngine.UI does not exist or Monobehavior does not exist, etc.)
Obviously you will not lose any assets and everything will be fine as before receiving the errors.
Have this issue with any template 2020+ versions
Always shows 2 empty errors on console at first run ,even on an empty project
Will try to install 2019 and hopefully work again
in my case some side app ran caused some error in the installation of Unity.
Nothing amid aboves helped.
Thus I decided to fully reinstall it from scratch to default one.
Now it worksok. But before that . To wipe out the Unity thorowly you need in:
uninstalling Unity and UnityHub in windows' settings
remove all related/remained folders in "C:\Program Files"
remove related/remained folders in "C:\Users\myname\AppData\Local "
in Register Editor go to clean unity like folders in "Computer\HKEY_CURRENT_USER\SOFTWARE"
optionally, remove sample projects in "C:\Users\myname"
You're very likely simply opening the wrong folder, it's a common mistake
Or, you have possibly moved around the folders that you cannot move
Also - it's a nuisance but it's best to install the "hub"

Flutter VS Code Quick Fix not suggesting import

Everything worked fine until a couple of days ago. Whenever I create new widgets or create some files and want to use them, I don't manually type import package:... but start typing the name of that class and press ctrl + . which provided a list of Quick fixes and always suggested import package:... until recently. No changes to Windows / Flutter / Dart / VS Code have been made except I installed svg-explorer-extension after following this advice (which I would highly doubt affected anything, yet it still updated some x64 c++ distribution something).
Right now, as I try to use existing files (all of them are in */lib folder) in the new files I create, the Quick fix menu provides all except import package:... options which makes the development process slow enough to ask a question here.
The only way to 'recover' that functionality is to run Developer: Reload Window in VS Code which stops the debug session, restarts Dart Analyzer, and everything seems to be okay for the next couple of minutes until it simply disappears.
How to not 'lose' that importing functionality? My project is rather big (22k lines) with 30+ dependencies. I tried reinstalling flutter SDK, flutter, and dart extensions from VS Code and that didn't help.
What suggestions do you have? Is this issue worth filing an issue for Flutter / Dart / Flutter Extension on GitHub?
Happening with recently and was fixed with the restart to update option.
It was so annoying and wasted my 1 hour searching over google and StackOverflow.
I was also stucked in this issue and the real answer to this question according to my analysis is : always create new widgets or dart classes within lib folder. You can create different folders such as widgets, screens, models but always create them in lib folder dont create them at the root level. Your problem of import will be solved. Infact VSCode will auto-import them
You can refer to this image below and see how I organized my lib folder
[1]: https://i.stack.imgur.com/Yau5i.png

Flutter iOS App Size issue: Runner.app size is ~450MB. Can anyone help how can this be reduced?

I have tried almost all the solutions available online. People has suggested to change flutter version to stable, clean the target etc.. but I am not able to reduce the Runner.app size so far with any of these solutions.
Note - In "Runner.app/Frameworks/Flutter.framework" folder there is one file named "Flutter" which is occupying 383MB of space.
Can anyone help me knowing how this can be reduced?
Diawi is not allowing me to upload that big file in order to get it installed using bar code & link.
Thanks in advance
you are not supposed to commit/push .../Flutter.framework folder to repo. So its size shouldn't matter, because it is dynamically generated in local dev env.
Try to run the command flutter clean on the terminal, then run the app again.
This action worked for me.