I am facing this issue everytime i start eclipse.
This is messing up the xml layouts. How do i reslove this ?
you can easily fix this
1) close your eclipse
2) go to your workspace folder
3) and delete .metadata folder
4) open your eclispse again
This is probably due to Android SDK. Check for SDK updates and install it. Reopen Eclipse and every thing should work fine.
This works, but have to re-import all the project from the workspace, as we are deleting the metadata.
Related
I've encountered a problem where on all of my applications, there's a red cross on the top right. I can run it, but the cross doesn't seem to go away.
I've opened the run/debug configurations and it says Warning : Main method not found. I don't understand why it's not found when I already have a corresponding main class and method for each and every application.
I tried to close the project, restarting IntelliJ, restarting my laptop, refreshing my desktop, refresh Gradle by clicking Reimport All Gradle Projects, rebuild the project and clicking Invalidate Caches / Restart. I also tried other suggestions I found on StackOverflow such as deleting the .idea folder. Nothing. The red cross still shows up. I've also realized that I do not have the out folder in all of my Applications.
I just set the language level to equal my SDK version at Project Structure. Finally, it is disappeared.
In Project Settings, First make sure SDK path is correct. Preferably install and use your own SDK. Then use the same SDK in Project and Modules in Project Settings.
File->Project structure ->SDKs
Choose JDK home path, if no jdk is in the path,
you'll see an icon download jdk
download then ok
Try to copy src and gradle folders and buil.gradle and settings,gradle files in separate folder. Then open this new folder as new project in intellij. Then intellij will propose Import as gradle project... - push it.
If problem remained see you build.gradle
I think Android Studio 3.5.3 has many issues needs to fixed.
Recently I had issue with the Android SDK so I had to uninstall it and reinstall to solve the problem.
Now when I try to open another existing project suddenly it generates corrupted classes some with the name R in that project.
I have tried the below options with no success.
Invalidate Cache and Restart.
Clean and rebuild the project.
Sync project with Gradle Files.
Sync with Files
Exit AS, Delete .deal folder, .gradle folder and .iml files. Then import the project.
Again uninstall Android SDK and reinstall.
Unfortunately non of the above helped me.Kindly assist.
what helped me, I had to manually copy the folder with all of the clean java files from the C:\Users\name\Desktop\ProjectName\app\src\main\java\com\ to somewhere safe.
Then I exit Android Studio,Delete everything in \src\main\java\com\ and then i went to the location where i had pasted the folder with my java files, copy them and paste them back to C:\Users\name\Desktop\ProjectName\app\src\main\java\com\
Magical it works,I don't know how but it solved my problem.
I have been using eclipse to learn how to program Java and one day when I tried to use Eclipse it would not open. I get the purple window with a loading bar but when that gets about half way it crashes but does not give me any report as to why it crashed. How could I fix Eclipse or how could I save my projects so that I can reinstall Eclipse?
Your projects are already saved in your hard disk. You just need to reinstall, and when you open again to give the specific path to your projects.
Your projects (Eclipse workspace folder) are saved on your hard-drive . It has nothing to do with your Eclipse crash. If the folder is located inside Eclipse folder, just copy it to some other location. If it is already outside, you are safe.
If you re-install Eclipse, just use this copied workspace as your Eclipse workspace, it should just work fine.
Note: It would be easy to fix existing Eclipse, given you provide exact error message.
be cool , you can get your projects without any problem
1) go to eclipse.org ("https://eclipse.org/downloads/") and download eclipse and re-install then it will bind with your existing workspace in eclipse then you can open your projects through eclipse
2)eclipse default workspace is" C:\Users\yourname\workspace " manualy go to this link in here replace "yourname" with your PC name and get your projects
I am using Intellij IDEA as an IDE for running Java programs. Dues to power fluctuation computer got restarted. Now when I launch the IDE after reboot i am getting the error Cannot convert project: /home/aniket/IdeaProjects/JavaDemoCodes/.idea/workspace.xml: Error on line -1: Premature end of file.
Has anyone encountered this situation before? What can I do to view my project back again?
I also had this after a power failure, I simply deleted the workspace.xml file from the projects .idea folder, restarted IntelliJ and it seemed to be OK apart from loosing which files were open.
Cheers,
Nick
I had this exact error when my laptop bluescreened. I solved it by:
Exit IntelliJ IDEA
Rename .idea folder
Start IntelliJ IDEA
Create new project from existing sources
Exit IntelliJ IDEA
Copy all files from old .idea folder to newly created one.
Restart IntelliJ IDEA
Finally solved the problem. Hers is the solution. First of all I had two Intellij IDEA projects open in two separate windows.
One was the project which had corresponding subversion repository. This was a file-based format project. Files that define a project are .iws, .ipr and .iml. .iws is the one corresponding to the workspace configuration. I just reverted back this file with svn revert project.iws and I could launch my project again.
But the problem in second project JavaDemoCodes still persisted as it was custom project I created and it looks by default we get a directory-based format project instead of file-based format project. This has all its configurations in /home/aniket/.IdeaIC12 directory. As many of you suggested i searched for workspace.xml here but could not find it. I tried find . -name *.xml but i still could not find it(Also as the error suggests there is no file /home/aniket/IdeaProjects/JavaDemoCodes/.idea/workspace.xml ).Finally I did import project from my first project(the one with svn repo) it detected my JavaDemoCodes project as Intellij IDEA project and let me open it in new window.
Not sure if this is the perfect answer but it solved my problem and yes as someone suggested I deleted .iws file from my 1st svn repo based project and tried to restart but was of no help. New .iws file was created but it still gave me the same error.
I have experienced this same problem. It happens to me when I have IntelliJ open and for whatever reason (usually problems with having multiple VPN connections open), my computer freezes and I have to do a forced re-boot.
My solution is to use Windows 7 restore. I'll go to the folder it is complaining about, right click on it, and do a restore. If I'm lucky, I have a restore point only a few days old.
For me, rebuilding my configuration on several projects from scratch is too time consuming. Using a restore point from a few days or even a week makes more sense.
Good luck.
I solved it just by creating a new project, then starting it and then reopening the old project..
When I open my file Java - I see ... nothing
but when I Restart Eclipse - all working again ... before it will not open another file of my project
what happens? I can not restart eclipse every time
Right click on the root of your project and select Refresh. Maybe the files are out of sync with the file system.
This could be a problem with installation of eclipse.I will suggest you to reinstall eclipse and adt plug in.