I'm trying to tinker with this project and am having some issues importing it.
https://github.com/HoloAddict/FeedEx
I'm a beginner still, and have made a couple of test projects from scratch, but I think I'd learn a little faster by going through working code in a larger project. Just can't get rid of errors to even build the existing code. These are the steps I have taken:
imported it in as a Git project (file - Import - Git - Projects from Git)
gen folder error (does not exist or not source) - right clicked on gen, Buld path - Use as a source folder. This made that particular error go away
all the src files were listed as src.net.fred... packages, so all the imports were errors. Right click - build path - configure build path - added Feedex/src in build path, got rid of those errors.
have the R.java problem... tried many clean-build approaches, no luck. Also tried taking one from a clean project, creating package net.fred.feedex in gen, creating file R.java, and putting code in from a clean project, but no luck. It did make the import R go away, but of course left many errors where the res class references are broken, again because that R file is missing (I think).
So that's where I am. It seems like I have an R.java problem, but I may have messed up on one of the other steps. Either way, thanks for the help.
When you imported the project did you check the "Copy projects into workspace"?
If not import your project again and see if this problem still continues.
Related
Got a new pc, and trying to import an existing maven project into IDEA (version 2018.3), with following steps:
import -> import project from external model -> maven
But, after importing, there is no src dir, I have tried many times, each time delete .idea/ before re-import.
I remember it did work before, but not this time.
And, I can compile the project successfully with mvn compile, also Eclipse could import it correctly.
Any idea what's wrong, and how to fix it?
First check if your intelliJ is collecting POM dependencies, on large projects it can go for hours. During collecting dependencies you will see no folders, but only root files.
If the above is not the case, right click on white project area/Maven/Reimport.
If you don't see it or that doesn't fix the problem, go to File->Project Structure... then choose Modules and check if you have duplicated modules and remove them.
I've addressed this problem by myself.
I've set up my IDEA using my previous setting backup, which therefore lead to the result that there are some legacy settings regarding maven and were imported by IDE.
A reasonable inference is that this is a built-in bug.
Restore the IDEA to default settings help address this problem.
Happy coding 🤣
When cleaning out my Workspace folder for a clearer view in Eclipse, I deleted android-support-v7-appcompat project thinking it was a sample code I downloaded a while ago. I figured out it wasn't a wise move and restored it back, importing it from Eclipse. I now have a problem accessing the R elements, even in new automatically generated projects. For example accessing the following elements gives a cannot be resolved or is not a field error on the last element:
R.layout.activity_crime, R.menu.crime, R.id.action_settings. I tried to rebuild the project, deleting the gen folder so R.java would regenerate but nothing changes. Why is this happening and how can I fix it?
A brief aside - it is honestly worth moving over to Android studio. I used eclipse until very recently and so many of these annoying little errors have been resolved.
Few things I used to do to fix this error:
Delete R class if it has been generated.
Make sure there is no errors in your xml.
Clean the project.
Make sure your build path is all correct.
restart eclipse
LAST RESORT: Make a new android project and copy over your code.
Hope this helps. Once again, really recommend AS.
Till you have problem in your "res" folder, R.java class could not be generated.
So try to resolve all problems (in xml files) before.
Try the following, until one of these results in success:
Look through your XML files for any errors and fix them.
Clean your project.
Restart Eclipse.
Clean again.
Create a new, clean workspace and import your existing project into it.
As for recreating the workspace – I have myself come across similar issues after messing with some internals, and recreating the workspace was the only way to fix it.
So I have a project that works totally fine in one workspace on my machine. I push it to the repository so everyone else can work on it. I go to pull it down making sure all the changes are good. I import the project into a new workspace and using eclipse with autobuild on it produces no errors.
I go to the command line and run ant clean release on the project and right before it gets to run crunch on the assets the build fails with a mulitple dex files define error. Ive checked the project high and low and compared to the other copy of it in the original workspace but for what ever reason I cant get it to build. I erase the bin and gen folders and remove all the imports and basically leave just the project, run clean in eclipse, and still get a dex define error related to one of the lib projects classes. Ive tried to find where extra copies could be but I dont find anything.
googling around for the past few days hasnt helped as the normal solutions to such a problem havent worked for me. So what is the best way to figure out where the extra class definitions are coming from so I can get rid of them and fix the repository so I can use it correctly. I have a feeling its related to one of the files in the project that I should be excluding in my gitignore but Im not sure which that would be. Any help on the matter would be greatly appreciated cause this has eaten quite a bit of time of just messing around.
When you have more than one class with the same package name this error would raise.
One of the common source of this issue is when you have for example different version on the same library.
For example your add ActionbarSherlock which in 'libs forder has it's own support library and also your project has another version of support library in it's libs folder. In such a cases you should put one version of support library.jar to all different libraries that you using it.
I hope this could help you.
I didnt find the root of the problem but I figured out a fix. I moved all the support libraries to a new root folder completely away from the android project. Once I did that and cleaned everything I then ran ant clean release and the project built fine.
I'm having a rather mysterious error:
All of my imports have been redlined with the message "the import cannot be resolved". However, the types referenced by those same imports are also redlined, and the auto fix suggests adding those exact imports.
The imports in question are from another project in my workspace, and that project is definitely in this project's workspace.
Does anybody know what the hell is going on here?
EDIT: I got the issue to go away by removing the project from the build path, copying it, deleting it, then pasting it back into the workspace and re-adding it to the build path. I'd still like to know if anybody knows what the heck happened though.
This happens sometimes when your buildpath loses its reference to your JRE. You can fix this by re-adding the JRE System Library to your buildpath. It is an interesting bug in Eclipse that I'm not sure why it happens.
The other option is to start new project and copy everything over, but this is tedious and annoying as it looks you have already discovered.
Sometimes it problems occurs when you are using maven and maven delete all .classes,
one solution is clean your project
In eclipse menu bar: Project > clean
I am taking over code someone else wrote and am having to find everything they used for this project manually because they didn't send everything that was needed. (One of those out of the country contract work deals.) Anyway, I'm having trouble finding something. They imported com.wavemaker.runtime.data, com.wavemaker.runtime.services and com.wavemaker.json.type and I can't figure out how to get these unresolved errors to go away. I've moved WaveMaker into the same folder as my project and I've searched high and low for a .jar file on my machine and on the internet to no avail. Please help?? (FYI I'm using Eclipse & Java)
This is easy, you have to add the jars to the eclipse configuration path (i.e: ~/WaveMaker/projects/wm_example_project/lib), when you find it, make sure that you add all those libs to your build path.