After creating a new Flutter Project in VSCode/Android Studio, there are just no code suggestions. Pressing ctrl+space usually brought up suggestions in both, but now on Android Studio it says no suggestions, and on VSCode I get the usual few snippets, no IntelliSense.
Weird thing is when I tried reopening previous projects, some projects are still fine, some projects have the same issue. I have attached screenshots of when it works, and when it doesn't
PS: I'm not sure if this is related but in VSCode just when a new project is made it fails to recognise the header file so it highlights everything as Error though the code runs fine. However this gets fixed when the window is reloaded
This usually happens when your IDE is not sync with the version of Dart and/or Flutter used in the project ; that's why on some projects it still works, and not on the other.
Option 1 :
Try to update your Dart/Flutter version on the project, and on the plugin/extension of the IDE. Watch out to have the last version of your IDE, not on beta channel, as well.
Option 2 :
If still not working after the update, delete IDE related files in problematic projects and reopen them.
Last time worked for me, hope it will for you !
Related
I have been using Android studio for a long time, yet never understood what are the processes that Android studio runs at when we load a new project via File>New or File>Open. We just load the project and have to wait for so many minutes before the android studio completes those processes (I know that we can still click on file names and editor would open them, but i have observed the android studio will still lag until all those processes are completed)
However I don't know how, recently My Android studio started behaving differently. I don't know what i did, But every time i created a new project, or loaded a previous one, it would show a message like this:
This was very good for me, because even when i don't click the try again
button, I am still able to access all files and without any lag, thereby removing a need for external file editor. I feel this was some bug in gradle or cache handling that got fixed when i uninstalled AS and updated to AS 3.5 .
So is there a way to manually run all those build and indexing processes, instead of Android Studio just running them automatically?
UPDATE:
I think i was not clear before. I want that error to occur . Meaning I want to have a control over when the building process starts. Also, I am NOT having any error as of now, all my projects are working fine.
Look for highlighted warnings in you Gradle file, you may need to update some things and then sync again.
You could also try to clean and rebuild your project.
You can also File->Invalidate Caches / Restart if none of the above work.
If none of the above work, please provide more details on what warnings/errors you get.
When version conflict in gradle file, it cant be able to build and sync the project.There may be show "Unsupported Modules Detected: Compilation is not supported for following modules”. Fix them too
I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.
I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.
I've installed Android Studio 2.3 rc1 and my app doesn't run. Only the Splash screen activity that I've setted up is shown, and then the app crashes.
The big problem is that the log is empty, shows only "Connected to process..." and "Application terminated".
How can I solve this? Is it normal for non-stable version of Android Studio (I'm a noob) or it's a problem of my app?
Edit 1: I've tried to create a new simple project but the result is the same. So maybe the problem is the IDE.
Edit 2 (partially solved): During operation on Edit 1, I've tried a code sample from My App, not an entirely new project, the problem was exactly in that code XD.
Now I've tried other projects and they work.
Edit 3 (solved): I'm really sorry, I think you can delete this thread. The logcat was not empty. I had exchanged the position of the logcat screen with the run one, and by force of habit, always clicked on it without reading the label that had changed. Forgive the fool.
Android studio allow you to run Stable, Beta and Canary builds at the same time. Try running your app on stable version to find out if this has something to do with the IDE or your app.
When you are running Beta/Canary builds it is always a good idea to keep a stable version in your computer as these releases are not always 100% stable.
These are the errors that i am getting when i attempt to run my project. It was working perfectly fine till yesterday. I have no idea what is causing the error. I cleaned the project and reran a number of times. I even restarted my laptop, but in vain. Please help me restore this, its a very huge project.
My friends copied the project on his laptop and was able to run it successfully. Which concludes that there has been a problem with my eclipse.
There are too many errors to sort out. I would very much recommend the easy way out which is to uninstall Eclipse (in case it really is the source of the problem) re-install it and start up a new project, then slowly add in the project files one by one. At least this way if the error comes back you know which file it is (if any). Best of luck.
Try to update eclipse if there is any update to apply.