I reinstall OS, pack my workspace on flash drive, with hopping, of just needing to copy/paste projects in workspace of ECLIPSE (luna) exactly i used on prior installation.
I included it all, no where RED. All seem ok, but.
I tried to change some behaivor on my program, and eclipse compile program regular, but on phone is the same program i stoped working on, prior reinstallation.
( *also tried to delete app, and install again )
Next what i done, to make me 100% sure that is eclipse issue, i add some obiviously exception, like not setting setContentView, and so on...
But it compile, and give me correct .apk.
What i tried:
Tried to change workspace, and copy/paste just src, res, and manifest file.
Also checked manifest file in bin, and it's exactly same as in root folder for project.
What to do? Is this some zombie
EDIT : Windows 8.1
I think copy/paste does not work. You need to import your projects into eclipse. Yu can do that by going to File>Import>Existing projects into workspace> and browse to your flash drive
so, this happend
In transaction, somehow eclipse made new package
main_activities
And i was to fast to take look at that. My main activities what try to edit was in package with name
activities
I dont know why eclipse did that...
I accidently take look at manifest file and found this issue...
Related
I was working on a project in Eclipse that has several classes and one Interface. I decided to export it as a jar so that I can run it on another machine.
This went just fine. However, when I went back to Eclipse, it suddenly removed all of my file one by one as soon as I tried to edit one of them. Now there is only one file left and it's not even my main. I had everything in the default workspace directory and now only that one file remains.
Can I undo it?
Something similar just happened to me a while ago, Eclipse has the option to recover files no matter if you have a version control or not...
make right click in the project and make a "Restore from local history"
a new window with all accidentally removed files will appear and you can undo the mess :)
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
I am having this annoying problem which takes 10-20 seconds and sometimes more every time my android project is refreshed or rebuilt.
I searched for android forums and also in stackoverflow and but solutions does not make sense. Please give me the solution or link to it.
My android project depends on two external java libs and android libs. Tell me if you need more info.
Earlier I asked this question and it solved the problem by removing 'source attachment'. But I believe it is not a good solution because I need source to be attached with jar. It helps while debugging, code browsing. If source is not attached then, your breakpoint stops there and you can't go in readable source.
Better Solution Needed. Is there a launcher option? which disables when app launched. or build options?
Instead of attaching a source folder to the .jar file, you should zip the source folder and attach the zipped file to the .jar.
See this answer for more info https://stackoverflow.com/a/9699242/637754
The reason for this is that you have attached source with your dependent jars. Just the remove the source from the class path. This how it can be done.
Right click on the project -> Select Build Path -> Configure Build Path.. -> Select Libraries
Select the Source attachment and Remove button will highlight. Press Remove and OK.
I think that should fix your issue.
this helped me so you can try too:
Go to your Workspace root/.metadata/.plugins/org.eclipse.jdt.core/ and remove .org.eclipse.jdt.core.external.folders folder
it contains .project file with links to external folders which takes too long to refresh
You can disable "Refresh on access" option in Window->Preferences->General->Workspace - it have no effect as I think, because even it's turned on you must manually refresh projects if you modify them outside of Eclipse
If anything else fails (my case), install a fresh copy of Eclipse Juno
Go to Help-Install Software, and add this repo:
https://dl-ssl.google.com/android/eclipse/
Check all options and install.
For migration reasons I was trying to install Eclipse on MAC OS Yosemite, since Android Studio is now the official IDE, it is hard to find Eclipse setups with the ADT plugin included. I tried several versions of Eclipse, and JUNO did the work.
I mistyped the package name when I created my android project, and it took me a while to notice. I used Eclipse's Rename function on the package to change it, and sort out all the references. I've updated the Manifest, and manually checked every file for any references to the old package name. However when I launch the app (it's a live wallpaper) and click settings, I get an IllegalStateException, exactly as if the permissions were not set up correctly (which they are). I've manually uninstalled the app and restarted eclipse. Is there any way out of this?
Update:
This is an android problem, not an eclipse problem. I created a new project in eclipse, and copied everything over, and when I ran it I got the same error.
Further update:
I've managed to get it working, I had to set the Activity to export in the manifest.
You can try to Clean the project like this:
(In the menu) Go to Project -> Clean -> and try to clean your current project.
I had a similiar issue before and this solved it.
Today I see a strange behaviour of Eclipse 3.5.2 for the first time in 3 months.
First, when I run a main function, it runs a previously compiled version. Let's say I press Ctrl+F11 in the window with an open java class and existing main function. Usually it rebuilds the class and runs a new version. Today even if there was a compile mistake, it would run fine. So I guess it does not recompile the class.
Next, more strangely, if I intentionally make a mistake in the code and Eclipse underlines those lines in red, still the project Explorer does not mark them as containing errors. They remain of grey color if there were not any errors.
First I did not know how to solve this problem. I tried to reopen the project, restart Eclipse and finally reboot the OS. After the tenth attempt, after rebooting, Eclipse said that all project's files are "OUT OF SYNC with the file system". When I pressed "Refresh" - F5 on a project's header name in Project Explorer it finally marked all the files with errors as containing errors and running the main function gave the desired result.
An hour of my work passed and this happened again , with the other project. All the same. No marking of files as red, running no matter what old version of class with no compile errors.
And since Eclipse does not tell that files are out of sync, simply pressing F5 on a project cannot help.
What can you suggest?
When you select a project in the Project Explorer view and press F5, Eclipse should traverse the entire directory tree for the project checking that all files and directories all in sync. It does for me ...
The only thing I can think of that would cause this not to work is if you have file system timestamp anomalies. For example, if a file in the file system is updated but the file's last-modified shows that it was updated in the past. This kind of thing can happen if your machine's system clock is moved backwards or forwards at an inconvenient time. If you think this might have happened, try closing all projects, restarting Eclipse and doing another F5 refresh.
(I used to run into Eclipse synchronization issues a lot, but I put that down to a combination of flakey plugins and doing builds from the command line. Either F5 or Project>Clean usually works for me.)
It is also worth checking that you haven't turned off "Build automatically"; see https://stackoverflow.com/a/2818290/139985. This is not a "refresh" problem, but it would be easy to confuse it with one.
Is Build automatically on? (Menu > Project > Build automatically)
It happened to me because there was a cyclic dependency between two projects. Each project had the other on its build path.
Solution: Reimport the project
It happened to me when checking out a new file from svn in explorer. Eclipse could not find the new file for some reason.
I tried refreshing the project(F5) and Project > Clean and build the project(Project > Build All) none of these worked for me.
So I deleted the project from the Project Explorer view(Not from hard disk). Make sure you unselect "Delete project contents on disk(cannot be undone)" checkbox and save any unsaved changes before you do this.
Now reimport the project using File > Import option. That should work in most cases.
If you use gradle, or something similar, instead of reimporting a project you can just regenerate the project files (gradle eclipse for example), and then you can refresh the project. Less cumbersome than deleting and reimporting.