Target of URI doesn't exist: 'package:validate/validate.dart' - flutter

I tried running flutter packages get. Restarted IntelliJ community but still:
Need solution in this missing imports for future different packages that will come.

open Quick Action Search Tool using cntrl+Shift+A on windows;
search for "restart dart analysis server" press it to execute, this will make dart to analyze project again.

Related

No modules selected. Dart support will be disabled for the project / IntelliJ

I got flutter upgarade and imported a project from git.
and I want to run this app but Dart support is disabled.
Flutter SDK path seems apllied but Dart ( on Setting > Languages & Frameworks > Dart seems not be able to be enabled.
How could I solve this situation?
enter image description here
To solve this problem, you need to set the flag to "Enable Dart support for the following modules"
I had same issue and checking both boxes would do anything, it would always reset back. My fix is:
delete the repository
clone again with terminal (don't use Studio) and set different name for poject: git clone (url) newName
And it works.

Flutter: find out which lint / analyzer rules are enabled at what level

One can analyze lint issues in a Flutter project by running flutter analyze. Also, by providing a analysis_options.yaml file, one can enable/disable/change severity of rules, as well as import a predefined set of rules from other locations (e.g. pedantic, or from a relative path).
But is there a way to show the complete list of enabled rules, as well as their severity?
I mean the final merged version of all of them. This would be incredibly helpful, especially for exporting the same config to use in sonarqube.
Thanks a lot for helping! 🙂
In IntelliJ you can open the Analyzer Server Diagnostics by pressing the gear icon in the Analysis tab; opening a new browser window.
There, open the Context for your package and it shows the list of all activated Lint rules as seen by the analysis server

Flutter driver Test Explorer

is there a way to get some kind of Flutter Test Explorer into the IntelliJ IDE?
I am thinking of something like JUnit has in Visual Studio. Let's say that it should be something like this. My tests are stored in Feature Files.
If yes please send me a link to an addon or tool.
Thanks.
EDIT 1:
I am talking about the tool which "sees" all feature files and scenarios in it before the run. User than can select which scenario will be executed from the list of scenarios.
If you run tests in IntelliJ you should see something very similar to what you have screen shotted above for VS. You may find if you're using a build tool (Gradle/Maven) that running tests defaults to using the build tool to do so but you can switch this back to IntelliJ alone. What are you currently seeing/not seeing in IntelliJ?
See https://www.jetbrains.com/help/idea/performing-tests.html for more info + screen shot very similar to VS.

Flutter error: Unable to locate gradlew script

I can't run all of my flutter apps, because in the console appears everytime this error message:
Downloading Gradle Wrapper... 1,2s
Launching lib\main.dart on SM G960F in debug mode...
Running Gradle task 'assembleDebug'...
Finished with error: Unable to locate gradlew script. Please check that C:\Users\...\android\gradlew.bat exists or that C:\Users\...\android can be read.
I try to fix this problem more than ten hours and don't find a solution.
I will advise you to check your pc properly for unwanted programs. Something is preventing your pc from running the Gradle. I had the same issue only to realize that antivirus was installed on my pc alongside a cd burner that I just installed. Check for any antivirus that might be preventing Gradle from running.
I also faced the same error initially. While creating a flutter application from scratch I just ran the default flutter application which is a counter app in a flutter. I faced the same issue at first. If you are in this same context as described earlier the following could be the solution
1.Java 8 is more suitable for the flutter/android development. The next versions of java have some exceptions. I used the Java 14 and stuck at this issue for some time
The next could be the JAVA_HOME path in your environment variables. If it is not provided the set the JAVA_HOME path.
Run flutter --doctor and check the requirements if satisfied like Android SDK is updated or not, upgrade flutter if required. In some cases having good Internet connection also plays a role in this issue some times.
These are the major points to be satisfied in order to get rid of this error. Mostly this could be the a solution or part of it.
The error suggests that something is preventing gradle to run properly on your machine. Check whether you have any unwanted programs or anti-virus on your machine running that might be preventing gradle to run. If so, remove or stop those programs / anti-virus and try again.
After that, delete the .gradle folder located here C:\Users\yourPcName\.gradle containing the unfinished file and try again . It will work now .
You can also manually download Gradle and map it in Android studio , Learn more with this article here .
Warning, the gradle versions change quickly, so make sure you manually
downloaded the exact version that flutter wanted to download and the
download failed. Download the gradle here and then replace it in the
gradle folder.
C:\Users\yourPcName\.gradle\wrapper\dists\gradle-x.x.x-all
If it still doesn't work,
Try to run flutter --doctor
From a console window that has the Flutter directory in the path (see above), run the following command to see if there are any platform dependencies you need to complete the setup:
C:\src\flutter> : flutter doctor
This command checks your environment and displays a report of the status of your Flutter installation. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).
You can learn more here :
If flutter doctor itself doesn't work, then know that flutter is not installed on your machine (or you forgot to add it to the environment
variable).
I also faced this problem and I made something to run my app on android
tried to open anything on android files and android studio ask me if I want to open for editing android file in android studio then click on it and it will open android project then click run enter image description here

Setting up libgdx in IntelliJ Idea with GWT Support?

So far the documentation doesn't include the set up of GWT project in IDEA, and my limited google skill can't find the solution. Is it possible?
If you generated your libgdx project using the gdx-setup.jar file, then you should import your project by using the following link: https://github.com/libgdx/libgdx/wiki/Gradle-and-Intellij-IDEA
HTML: View -> Tool Window -> Terminal, in the terminal, make sure you are in the root folder of your project. Then execute gradlew.bat html:superDev (Windows) or ./gradlew html:superDev (Linux, Mac OS X). This will take a while, as your Java code is compiled to Javascript.
Once you see the message The code server is ready, fire up your browser and go to http://localhost:8080/html. This is your app running in the browser! When you change any of your Java code or assets, just click the SuperDev refresh button while you are on the site and the server will recompile your code and reload the page! To kill the process, simply press CTRL + C in the terminal window.
Once this bug in the Gradle tooling API is fixed, we can simplify running the HTML5 by using the Gradle integration. At the moment, the Gradle process will run forever even if canceled.
Also just a heads up, after you have run the gradle command it might say something like this:
The code server is ready.
Next, visit: http://localhost:9876/
Building 91% > :html:superDev
Even though it says 91%, don't worry it will still work, just go here to run it: http://localhost:8080/html/, NOT the url mentioned in the log.
Also to deploy you need to run ./gradlew html:dist to generate production code, you want to copy everything inside ./html/build/dist/ to your server. Running that command produces the code in that directory. https://gamedev.stackexchange.com/a/82588/54396
I was able to make GWT work with libgdx simply by:
downloading (http://www.gwtproject.org/download.html) the GWT SDK,
extracting it,
then in the project structure -> project-name-html -> dependencies,
just press the + and add the extracted GWT directory
A dialog appears and I just unticked all the samples
The "Dependencies Storage Format" needed to be "Intellij IDEA", not Eclipse for this to work for me.