How do I edit running configuration in Flutter/Android Studio? - flutter

I created an app in Flutter and it was running fine, but I adjusted something and when I tried to debug it on the emulator, a new window popped up which I think was called "Configuration Editor" or something. I'd no idea what to do with it, but the app wouldn't run without it, so I entered some random data in one of the fields to see what would happen.
Now Android Studio seems to be trying to run the app with this data, and it won't run. I'm getting the error:
Target file "4,6,8" not found.
where "4,6,8" is the data I entered. I assume I need to blank out those fields again, but I don't know how to open the configuration file or whatever it was where I entered the data!

I assume you messed up the running configuration for the project, setting a file that doesn't exist "4,6,8".
Anyway, if this is the problem, you can configure it again in Android Studio:
Then set the entry file 'main.dart' of your project. The 'additional arguments' and 'flavor' are optional.

In my case it occur due to the reason that pubspec.yaml is missing that is why main.dart is not running as it did not found flutter sdk and other dependencies present pubspec.yaml file.

Related

Flutter could not resolve all files for configuration classpath

I tried to run the basic click counter app in VSCode, but it is not working on emulator, or my physical device either.
These are the errors being thrown.
I have not changed any file from creation of project.

Entrypoint is not a Dart file in flutter

i have been reading more than 10 similiar question for this error and still cant solve my problem
im trying delete .idea and still cant solve it,trying add content root in my project too, but the problem isn`t solved, can you help me?, thanks
Apart from the warning 'Entrypoint is not a dart file' my main.dart was also showing the code in just one plain color (white) with no intellisense whatsoever.
After deleting .ideal/ folder and dart_tools, uninstalling/re-instaling android studio, and other attempts, there was no luck and no solution on google addressing this very error message so i decided to try this:
After saving my work
Go To File in Android Studio Menu at the top
Manage IDE Settings
Restore Default Settings
It will redownload android sdk and setup everything as new.
Paste your codes from previous projects and ride on!

Flutter web throws error on same project but different laptop

So I just won a new laptop in a competition and now I am having some trouble migrating my flutter projects. I have set up the editor and migrated the important files in the code, i.e the lib, image, font, pubspec.yaml and web. But this app is now throwing the following error
Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
ERROR - 2020-12-29 13:08:07.845202
GET /main_module.bootstrap.js
Error thrown by handler.
AbsoluteImportUriError: 'file:///C:/FlutterProjects/xspectre/lib/help/Auth.dart'
package:dwds/src/debugging/metadata/provider.dart 154:9 MetadataProvider._addMetadata
package:dwds/src/debugging/metadata/provider.dart 133:15 MetadataProvider._initialize.<fn>
I thought it may be a problem with my flutter but it runs the default flutter app without problem.
I also tried deleting the file but the problem just shifts to another file. I can safely say that this a is a problem with the help folder which provides me essential tools such as the auth service. What should I do? I will provide any code neccesary. You can find the entire code here
The Error:
The error is happening because when importing your new project, some imports in your .dart files are now using absolute paths instead of relative paths. In your case, this is happening at least in one .dart file that is calling your Auth.dart.
Sloution:
Step 1: Look at the top of all your .dart files, more precisely at every single import. You will have to change everything starting with:
import 'file:///C:/...
by
import 'package:... and add the name of your app
Step 2: Rerun your project and everything should work now
If still issues, then make sure you looked at all your files to ensure you did not miss other wrong import... also, you can run flutter clean then run a Pub Get
(thanks to melwinlobo18)
Please mark the answer if this was useful ;0)

Getting Flutter doctor to work

How do I get flutter doctor on my Windows 10 laptop to work, please?
I followed the guidelines here,
Used git to clone the flutter repository,
git clone -b alpha https://github.com/flutter/flutter.git,
Tried adding "C:\Users\<user>\flutter\bin" to my path in the Control Panel
and then in an Admin Powershell, tried executing flutter doctor.
At first, it just hung.
After googling for help, I tried deleting the contents of the
C:\Users\<user>\flutter\bin\cache folder and re-executing flutter doctor but to no avail.
Then, I tried deleting all of flutter and cloning again but flutter doctor just hung again but with, Updating flutter tool.
Tried a few different Googled PATH-adding ideas (that seems to be a complex and disputed area.)
Got a new message: Waiting for another flutter command to release the startuplock
The latest state is that flutter doctor still just hangs but without any message.
I suspect the problem lies in the new Path not being properly recognised (in the registers??)
Can anyone help please?
Well, the issue is not clear enough, but this might be solution, if your flutter doctor is stuck, it might be due to Background Intelligent Transfer Service is disabled, in order to check for yourself, do the following:
Click on the start menu, and then start typing services.
Launch the services and look for Background Intelligent Transfer Service and make sure it is running.
At this stage I believe you will find it disabled for some reason, just right click on it and go to properties and start the service, also change the startup type to automatic.
I can not think of other reasons that might prevent flutter doctor to run for the first time on a Windows machine other than that honestly.
I know this question is a little bit old. Here is a solution that worked for me. Run the Command Prompt as an admin solved the issue for me.
For Windows user check to see if the unzipped flutter folder is read only. (i.e right click the folder then properties then in the attributes section untick the readonly property then apply this change to the folder along with the sub-folders then ok and thats it. Worked for me.
Some errors I got and how I fixed it:
(ERROR 1):
[flutter] flutter doctor -v 'crumb' is not recognized as an internal or external command, operable program or batch file.
Error: Unable to find git in your PATH. exit code 1
(Fix) - Go to flutter installation folder and inside flutter/bin edit the flutter.bat file using a text editor and remove the line (20) that says:
IF EXIST "%mingit_path%" SET PATH=%PATH%;%mingit_path%
The code should look like this on those lines:
REM If available, add location of bundled mingit to PATH
SET mingit_path=%FLUTTER_ROOT%\bin\mingit\cmd
Save and Run flutter doctor and everything should work fine.
(ERROR 2):
flutter doctor takes too long
(Fix) - I downloaded the previous version of the sdk it worked like a charm.
(ERROR 3):
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.
(Fix):
Open Android Studio
Tools Menu, SDK Manager
In the window that comes up there are inner panels, choose SDK Tools panel
Tick Android SDK Command-line Tools
Choose Apply button near the bottom of the window
This worked.
(ERROR 4):
The term 'flutter' is not recognized as the name of a cmdlet, function, script file, or operable program.
(Fix) - Put the correct part in the env variables. I had put D:\flutter instead of D:\flutter\bin. That worked.
I got a solution that worked for me
initially i had downloaded the 2.2.5 SDK which gave the forever run error so i went back and downloaded the previous version ie 2.2.2 it worked like a charm
The Flutter SDK is installed in a protected folder and may not function correctly. Please move the SDK to a location that is user-writable without Administration permissions and restart.

Xcode: Build error: tried to link DWARF for unsupported file:

I've changed something in my project settings and now when I run this project to build and debug I get build error:
GenerateDSYMFile error: tried to link DWARF for unsupported file: "correct path to my application executable here"
but! when I press RUN once more it works like a charm and my app starts in Simulator.
so I need press cmd-R twice every time to debug my app.
it was normal in previous version of my project so I don't know what changes I've made %)
all my other projects works fine and I can just recreate this project, but I want to figured it out - what trigger this error. I tried to ask this question on Apple devforums but without any success.
any help here? thx )
ps this error shows as Xcode3 as Xcode4
There is same file name as your project name in bundle so get rid of that file by renaming it and use accordingly.
Clean the project and run the project. Good to go.
not sure if you figured out what the problem was, had the same thing happen to me. I had made a text file called the same name as my project - when I got rid of that it fixed it.
Try changing under Build Options > Debug Information Format. See if that helps.
I got it when I tried to run my app in the simulator.
Xcode said ATTACHING TO PROCESS but hung.
So had to kill XCode and restart.
When I ran project again it built ok but when I said RUN it got that link error.
I fixed it by deleting the app in the Simulator and hit run again and it worked.
In my case It was a plist file causing the error.
I renamed the file and updated Info.plist File in Target Build Settings and that fixed it.
I got the same error: "error: tried to link DWARF for unsupported file: /Volumes/..."
This error wasn't shown before up until I changed to Xcode 6 in my Jenkins server. Before we had the same setting of the App and was building without any problem.
I was building the app as Realase version via Jenkins and I had the setting to build with the following configuration "-configuration Release" and the parameter "Debug Information Format" in Build Setting of the app was set to DWARF-with-dSYM.
In order to solve this error I changed in the targets in Xcode in Build Settings in the parameter "Debug Information Format" to DWARF only and I didn't get any error from Jenkins.
The apple developer documentation says this regarding the different values of this parameter:
DEBUG_INFORMATION_FORMAT (Debug Information Format)
Description: Identifier. Identifies the format used to store the binary’s debug information.
Values:
stabs: Use the Stabs format and place the debug information in the binary.
dwarf: Use the DWARF format and place the debug information in the binary.
dwarf-with-dsym: Use the DWARF format and place the debug information in a dSYM file.
Default value:
dwarf
Prerequisite for:
“GCC_ENABLE_SYMBOL_SEPARATION (Separate PCH Symbols).”
Link: https://developer.apple.com/library/mac/documentation/developertools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html