Eclipse rebuilds R every time - android

Every time I start eclipse it opens my last opened Android project and starts recompiling R and others so for a few seconds I see lot's of red error markers on my scroll bar and I should wait until it finishes recompiling.
This behavior is new and I had not such problem before.

By default, the Eclipse workbench is configured to build projects automatically. However, for Android development you should disable this option, otherwise your entire project will be rebuilt whenever, for example, you save a change any file or restart the eclipse.
Click Project > Build Automatically and ensure there is no checkmark beside the Build Automatically menu item.

Related

Facebook Android SDK 3.0 calls just show a white screen

I have a lot of issues with the Facebook Android SDK 3.0 — a lot. Here's one which is particularly annoying: I have added the Facebook project to my workspace and linked it to my Android application. Now when I export my application (by right clicking on the project in Eclipse, selecting the Android Tools option and then clicking Export Signed Application Package), my signed application package exports okay. I notice however that around 50% of the time I export my APK, when I then make any Facebook SDK request using this APK (like opening a session or requesting additional permissions or anything of the like), I just get a white screen showing a progress bar which hangs indefinitely, as follows...
It hangs there until I press the device's Back button, at which point I get a SessionState.CLOSED_LOGIN_FAILED session callback. Basically, it builds badly on almost every other export. Is anyone else experiencing this or know how I can stop this from happening? It's very very time-consuming having to build two or three times until I get a good APK. I am refreshing the projects in my workspace and doing a Project -> Clean -> Clean all projects every time and even that doesn't do the trick.
What I've done the last few times I've had to export my signed application package is to go to my project's properties, open the Android option, remove the Facebook library reference and then re-add it. I've had five consecutive good exports doing this so I'm guessing this does the trick!

can not create new android application project in eclipse but can import and run existing

If I import existing android project in eclipse it works. But when I try to create new android project everything up-to last screen works but on last screen even if I press finish button, the dialog remains as it is, it doesn't get dismissed. And in Background also the project gets created, with required folders or packages but all folders and packages are blank.
e.g. in screenshot I'm trying to create project named Test, when I click finish, it gets created in background(in red).
Also there is another one project named Hi in background(in red) with empty folders and packages.
I'm using Helios(eclipse).
I have had a lot of trouble getting the SDK to work properly in Helios over the past year or so, and eventually had to upgrade.
I would either download a newer version of eclipse, or just go to the android sdk download page and download their bundle of the SDK+eclipse.

How do you disable Android Library Update?

Is there any way to disable automatic Android Library Update when starting Eclipse?
The one related to the "Android Library Update" message shown in the progressbar at the bottom when starting Eclipse
AFAIK, there is no way to disable it, and even if there is, your projects probably would not work afterwards.
However, you can reduce the amount of time spent on this and other startup tasks. Simply close projects that you do not need to have open. You can leave the projects in the workspace, but just close them via right-clicking on the project in the Package Explorer and choosing "Close Project".
My Eclipse workspace has ~350 Android projects. It used to take a minor eternity to fire up Eclipse in the morning. I switched to keeping most projects closed, leaving open only:
stuff I am working on
all Android library projects (in case stuff I am working on, now or later, depends upon them)
stuff I opened earlier and haven't gotten around to closing again yet
I have a few dozen projects open at the moment. Now, Eclipse starts up fairly quickly.

Android application problems in Eclipse

I'm a .NET developer but I like JAVA so in my free time I play around with that. I don't normally use Eclipse but I installed the ADT eclipse plugin and Andriod SDK and I started learning and I made a new project with a TableLayout and it kinda looks good, and it runs ok on the emulator.
However... there a few things that drive me absolutely catatonic and perhaps I am doing something wrong so please help me out.
Firstly, if I change the main.xml file in whatever way, even by adding what is supposedly a correct parameter, it will start freaking out and will generate an error that just says "error" without specifying what that is, it will then generate a main.out.xml and then report an error that the main.out.xml is empty. It later won't let me delete that and will start generating a main.out.out.xml and so forth, even after I correct that original xml that caused the error.
The only way to get things going is to delete the bin folder, restart Eclipse, delete all the out xml files and then sometimes it will run the application or some other times it will start generating those 'out' files again and the loop goes on.
That way it takes hours to run a simple app even one without errors that used to run before.
Surely that was NOT how they intended it to work, is it??
Also.. there is no "Rebuild" button that will flush all files out automatically, or is it hidden somewhere? I am tired of manually deleting those automatically generated files and the build folder and all those out.xml files.
Also, while I'm at it, I also want to point out that the designer view sometimes disappears and there is nothing on earth that will bring it back, the only way is to create a new project and copy the main.xml to it and then it shows up again. Another bug?
I have the latest eclipse version:
Version: Indigo Service Release 2
Build id: 20120216-1857
If you have any clues how to get this to work, I will appreciate it!
Many thanks in advance
When you click the Run button with an XML file selected, Eclipse is running an XSL Transformation on that XML and producing the .out.xml file as the result. This is a feature of the Eclipse Web Tools feature, which you'll have if you installed the Eclipse for Java EE Developers package (it may be included in other packages, too).
As others have said above in the comments, to run your Android app, select the Project, right-click, and choose Run As > Android App. Once you've done that once, it will create a Launch Configuration that you can launch from the Run or Debug toolbar buttons (pressing the small down-arrow on the Run or Debug buttons brings up a list of Launch Configurations that you can select from, as well as an option to manage them).
There is a Preference that will make Eclipse always launch the last thing you ran or debugged, instead of trying to be smart about what is currently selected. Open the Preferences and navigate to Run/Debug > Launching; there you'll find the option under Launch Operation at the bottom of the window.

run button opens a new AVM

I have troubles compiling my code with eclipse. Each time I click the run button it opens a new AVM.
I am starting to get lost in here any hint or solution please?
The run button in eclipse is designed to launch your code, which has to be done either in the AVM or on hardware connected to your computer. If you are wanting to build the binary without executing you go to the project menu and select Build All. However, it is probably set by default to build automatically, which is also under the project menu. Effectively this means the code you are writing is being built "on the fly" and errors will appear dynamically as you write your code. Is this what you were asking?

Categories

Resources