That topic might have sounded a little silly, so forgive that, but here's what's happening:
I have several folder in my Package Explorer that contain several projects I've been working on.
The problem is that Eclipse seems to not find my projects within my folder.
Those folder-like icons are suppose to be double-clickable to reveal my projects...
But after I closed up last time, they won't show up again.
None of them!
And they're all there. In the Workspace I've always used. All the files, all the folders, all the everything.
Why can't Eclipse find them?
I've tried creating a new Workspace, as well as importing the old projects over again, but then I got the error that these projects already exist.
I've restarted Eclipse, restarted my computer and anything else I can think of restarting.
The biggest issue I have is that now I can't access any of my work, and thus can't keep working on it!
Could anyone be kind enough to take a stab at how I should go about fixing this?
Please, be gentle. I'm a little green to all this.
You can go into arcives in the top-left corner and click on projects to see if it's the correct project folder.
Another thing you can do is to check if the project-files are still in the folder where you have your workspace. If they are there it can help to create a "new" project with the same name and all the files will automaticlly be in the project again. :)
Related
I am having a strange situation where Eclipse is doing this. Here is a screenshot:
Here is the screenshot of my Github repo where updates are pushed:
Thus, I think 'src/noobchain' is the folder/package thing I want to keep and I want to delete the lower 'src' folder/package thing because it is a duplicate. It wasn't like this before, I just had the 'src/noobchain' but then Eclipse did something on its own (I know this because I checked the Edit to undo and it was greyed out).
Now when I try to delete one or the other, they both get deleted.
So I came up with possible solutions in my head now which is to do a 'git pull' to my local after closing Eclipse and then restarting Eclipse. But I'm wondering if someone else experienced this odd behavior by Eclipse Photon on Ubuntu 18.04.
I did as Goibniu suggested above by right clicking on src and then build path->use as source folder and I ended up with:
It looks weird with two sets of the classes but I can run it so no complaints I guess.
When I try to delete the src it tells me it contains a Java source folder, it will delete the source folder as well. Thus, I guess I have to leave it alone. Not a perfect answer but it works. If anyone has a better solution, please post.
I was working on a project in Intellij when my laptop suddenly turned off completely(I unplugged the charger and apparently the battery loses contact if you move the computer). I'm sure I saved before unplugging. Now that I launch Intellij, I noticed several unpleasant changes:
The IDE doesn't remember recent projects; it didn't open my project straight up after I launched it as it usually did before.
Project files are all gone, all that remains is an .iml file.
The color theme changed back to white, even though I switched it to black.
Most disturbingly, local history appears to be wiped, there's nothing there save for the .iml file.
In the light of these circumstances, I have these questions:
What the hell happened? Why did all my files disappear? They were all saved, so how could they just vanish?
Is there any way to recover them or did Intellij scrapped them so thoroughly they're gone?
Right click on the project directory or folder. Go to
Local_History > Show_History
From the list of history, Right click on the change you want to recover and choose Revert
It appears that one or more of the IntelliJ project files was corrupted during the sudden power off. As a result, IntelliJ is not loading your project correctly. I would approach this by creating a new project, with the same options as your first one, and then copying the source files over from the old location.
I had no power or issues, I just left my laptop in sleep with idea running, and now everything is gone.
This issue also happened to people here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206877445-Please-help-IntelliJ-11-just-deleted-all-my-files-?page=1#community_comment_204002510
For me, I was lucky that I could still recover/undelete these files using a tool like Recuva
I have recently started modding in Minecraft 1.8, with Eclipse. I created a test mod, and it worked perfectly. Then I decided to start a new mod from scratch.
Almost immediately, I got an error by my imports.
I tried pressing Ctrl+Shift+O, to organize my imports, and it just deleted them, because they couldn't be resolved. I tried going back to my previous project, and the imports weren't working there either.
After some playing around, I realized that other imports were working.
Only net.minecraftforge imports weren't working.
I am extremely confused as to why this is happening. If you need me to upload my code, I will gladly do so. I greatly appreciate your help in advance. Thank you.
When something goes askew with Eclipse when modding it's important to first check if the workspace is still good.
Sometimes for whatever reason a jar can get corrupted, deleted, locked by virusscanner, aliens kidnap it...
reason why isn't important unless you are into such a thing, but if you are solution minded first try to reset your workspace.
By running gradlew setupDecompWorkspace eclipse you redownload the stuff, re-decompile the jars and re-setup all the workspace items eclipse needs.
If your problem isn't solved after that you have a more serious issue.
Then I suggest you start really afresh.
Redownload the forge src from http://files.minecraftforge.net, extract it to a new directory and then run gradlew setupDecompWorkspace eclipse in that directory.
Then copy over your source files and see if the issue is resolved.
Then slowly add your dependencies/external jars.
I'm creating a clean project on ADT and I noticed that the gen folder is empty (with no R.java in it), not letting me run the project. I'm running ADT with all stuff up-to-date (as you can see here)
I already cleaned and built it in every possible way. I also tried to reimport the project, and nothing. There are no errors in the XML files.
I searched for a solution and I found a lot of people with the same problem, and in most cases the solution was to update the SDK tools, but it didn't work for me.
Is there a reason for this?
at the top of screen, click build -> rebuild project
Give it a few seconds. it worked for me, i hope it save you aswell
im using Android Studio(beta) 0.8.9
My R disappeared after i fiddled with sound files in my res/raw directory(converted them to different formats, figuring out how SoundPool class works...and suddenly there is red "R"'s everywhere!
Try right clicking on the project, then going to Android Tools > Fix Project Properties.
If that doesn't work, then try cleaning it before and possibly after that.
If R.java disappears, you usually have to recreate the project from scratch again.
There are many reasons for R.java missing issue, i use to face this issue frequently, some of my thoughts to debug this issue.
Try creating another test project using File->New->Project->Android->Android Application Project. After creating the project run the project in emulator. If every thing works then your setup is perfect.
Check your imports section of your java files, some times default R.java gets included which is from android package. In this case Remove that import and add correct import statement.
Check your "res" folder all the xml's should be well formed and valid.
Hope these debugging steps may help to find the root cause.
try deleting the r.java file in gen folder. when you run again after cleaning and building the project. It should recreate those files and it should work after that. Try that.
Other wise you might have to reinstall Eclipse as you have tried in so many different projects
Something I just noticed was that after I removed the auto-generated code for the menus (which I wasn't using) it started causing errors. Eventually when I cleaned with the menu xml's still in the file structure, my R file disappeared. I removed all entries in the menu folder and then cleaned again. This worked for my specific instance. Hope this helps others as well.
I've checked every site I can find for the last two days and read more that I could imagine it would take to fix this.
I had an app half made and then I couldn't get java to see a layout I had made. I hit clean like I had on many other things. Then R.java disappeared.
I deleted the layout just to be sure it wasn't the cause. R.java did not come back.
I then decided to rebuild from the previous project. About a quarter of the way through the same thing happens.
Now, half the time I start a new project R.java isn't there to begin with. And when it is there it doesn't update at all.
I have made sure to update to the newest software. I've tried "Build Project" I've tried restarting eclipse.
I have tried saving my R.java file and then when it auto deletes I replace it with the recent save. I get aapt.exe has experienced a problem and needs to close" which also happens when I try to clean the old projects to fix them.
This is wrecking my coding.
I often have problems with the R file as well. Here are some things you can try:
Delete R.java and see if it regenerates (make sure Auto build is turn on)
Turn off auto build and manually compile the project
Go to your hidden .android folder and delete debug_keystore, then restart Eclipse and rebuild. May need to restart the computer as well.
Completely uninstall and reinstall Eclipse
Then there's the other suggested answers... check your XML files for errors, make sure your classes import the correct R file instead of android.R, etc.
Do you get any specific error messages in the console?
This happens for ALL your projects?
On eclipse package explorer menu (left menu that your projects are listed) right click, select android tools,select fix project properties,
if it works, let everyone know so other people can benefit.
Check if you accidentally imported android.R, this can cause problems also. See answer from Lars here: Missing R.java file even though project cleaned