Unable to run android eclipse project due to unfigured errors - android

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.

Related

why does Android Studio not recognize functions?

I did not change anything in my code, nor in the grade file, but I clicked on the update gradle notification android studio gets from time to time. I am not sure what the problem is but suddenly the IDE does not recognize some functions anymore, like String methods
also this icon changed:
My old project runs, but when I create a new project it won't work it says:
Error running 'app': Default Activity not found.
Help would be much appreciated.
I had the same issue I tried closing android down and restarted it up again and it started working, couldn't tell you why it happened though.
Try cleaning your project and rebuilding it from the Build Option. I have experienced this a lot of time as well. This works for me. As to why it works, I am not sure it. Hopefully someone would soon pitch in.
Go to C:\Users\{user}\.AndroidStudio4.0\system
and delete the caches folder.
Tried a lot of things I found online, but only this worked.

Code Suggestions stopped Working (Flutter)

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 !

Do not build Android project automatically on opening

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

Android Studio gradle build stuck at app:processDebugResources

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.

Unhandled event loop exception in plugin org.eclipse.ui

I recently installed/updated eclipse environment. When I try to compile the code I'm getting the error as:
Unhandled event loop exception
and says the error is in the org.eclipse.ui plugin-in.
Can any one help me on this?
Ok please follow the following steps:
First close your eclipse.
Go to your Eclipse Folder
You will find the "Features" & "Plugins" folders in it.
Open the "Features" folder and search for the "org.eclipse.ui" folder or .jar file. If found then cut it & paste on desktop.
Open the "Plugins" Folder and search for the "org.eclipse.ui" folder or .jar file. If found then cut it & paste on desktop.
Now start your eclipse & try to compile.
It's possible that while updating it has downloaded the wrong updates.
Finally after spending 2 hours trying to fix Eclipse, I just re-installed Eclipse and everything worked in the following 15 minutes.
no need to worry.. if you running android application.. give eclipse some time... restart your computer after some times open eclipse clean all projects.. now try.. it working perfectly now.. :D
Cleaning all projects worked for me!
I also had "Unhanded event loop exception" in Eclipse neon.3 on Linux Mint, and there were other problems such as the perspective button bar either not showing or else throwing an error when you attempted to configure it.
I found the solution in comment #7 of an Eclipse bug discussion.
The solution is to start eclipse after first executing these commands:
export SWT_WEBKIT2=1
export SWT_GTK3=0
The solution here was not working for me but after digging through the internet it became clear that some other software is messing up eclipse.
In my case it was the hydra vision in the catalyst control center. As I can see any application that messing with window handling will or can cause this error, based on the variety of setups and background from other people who experienced this problem.
One of the best ways to determine which application is causing the problem (if it's an applicaion) is:
open the task manager
start killing processes (start with unknown or new or any video related driver).
After each process kill check eclipse (restart it each time, just in case)
and after killing hydra vision the error did not pop again (no restart was needed but who knows how other application works).
Hope this will help others to not spend a day on this annoying problem.
Best for all
In conjunction to cleaning all of the projects as suggested by Michael Martin, I also appended this line in the eclipse.ini:
-XX:+UseConcMarkSweepGC
Per this documentation.

Categories

Resources