After several years with Eclipse and Android development this combination is driving me nuts.
On every start of Eclipse the lib settings I've configured on the page 'Project/Properties/Android' section 'Lib' need to be re-applied.
After a Eclipse restart all existing projects are marked in red. For every project I have to select that project, change to the page described above, remove all Libs, hit Apply, re-enter the same Libs and hit apply again. .classpath and .project look ok. It's the latest Android SDK and the latest Helios Eclipse release. MotoDEV is installed as plugin.
This is a stupid and time-consuming process. Please, has anybody an idea what's wrong with Eclipse (or the Android SDK) or my configuration?
Many thanks in advance.
Which OS are you using and is it 32- or 64-bit? Are you logged in as root/administrator or as a regular user? This sounds suspiciously like the ~/.eclipse folder isn't getting written correctly. We can look at this in MOTODEV Studio and see if it's something unique to us, but it definitely is strange behavior.
Update: one of the MOTODEV Studio team says this is a known bug in ADT when using linked folders. http://code.google.com/p/android/issues/detail?id=14217
Related
I have downloaded ADT Plugin for Eclipse. I don't see Android anywhere either when creating a new project, Preferences or "Customize perspective"
I have searched for the answer but I couldn't find it. The only thing that I didn't try is opening "command group availability" tab mentioned in forum not showing Android And AVD manager in eclipse because I can't see it at my setup.
I'm using Eclipse Neon.2 with JDK jdk1.8.0_121. I didn't add a PATH variable in my system. Not sure if I have to or not.
Android ADT doesn't seem to work for me in Neon too (same errors and long time search on startup without results)
There is a new Eclipse Android dedicated IDE now at https://eclipse.org/downloads/packages/eclipse-android-developers-includes-incubating-components/neon2 Must be installed in a separate folder with separate workspace (and renamed if needed) and all existing Android projects can be moved there. Afterwards i uninstalled ADT from the original Eclipse folder.
There is Installation Instructions for Google Plugin for Eclipse 4.6 (Neon)
https://developers.google.com/eclipse/docs/install-eclipse-4.6
It appears that either Eclipse Neon.2 stopped supporting ADT or that it has issues with it. I went back to Eclipse Neon.1 and I can find Android references all over, so I think the issue is something to do with Eclipse Neon.2.
Thanks to all of you who tried to help.
UPDATE:
It appears that for Neon.2 there is a separate package for Android that you can find here:
http://www.eclipse.org/downloads/packages/eclipse-android-developers-includes-incubating-components/neon2
This is the detailed version of what happened. Please have a little patience and read this. I think my problem is unique.
Initially I had installed Eclipse and followed all procedures and was happily coding my first app. One fine day I fired up the SDK manager and saw the Android Tools had a new update. I tried to install the package. Then may be due to my slow net, something went wrong and Eclipse didn't work at all. It said there was something wrong in some file as an error message.
So I installed Eclipse again and followed all procedures. The address of the workspace and the Android SDK was kept same so that my projects will be automatically imported. But now Eclipse is underlining the R or Resource references in my src files. I do not know what to do.
Did you try opening the sample project that is shipped with andoid SDK? If even that one has the problrm, I think you must update ADT plug-in. Updating SDK and not ADT plug-in caused the problem for me. Once I updated ADT plug-in, everything worked fine.
I've recently (this morning) updated a bunch of android plugins in my eclipse environment (so I could switch over to Android Studio), however, I decided to return to Eclipse to finish something up. I had to re-import the actionbarsherlock project (4.2.0 library). After I imported, made sure it was running on Android 4.2 and as a library, I cleaned the actionbarsherlock 'library' project. Which resulted in over 200 'R cannot be resolved to a variable' problem.
I've tried all the usual suspects: couldn't find any errors in the res file, tried cleaning, refreshing, closing eclipse in various different orders.
I'm also noticing a new dependency entitled "Android Private Libraries" -- I am not positive it is new from this update, but it could be.
Other information that might be useful:
- there are no gen files (nothing is being generated)
- I also linked it to my Android Project as a library (set to the same API level)
- I've done separate cleans and a clean at once
Any help would be great, I'm stuck on this one and it's driving me nuts.
You have to check the Android Private Libraries in the java build path of the project:
Resolved by updating the API's as well as the tools and everything else I updated this morning. Very weird situation.
In my case I had the wrong Android target. To solve it:
Right click on your project, then Properties, then click on Android and select the correct Project Build Target.
I had Android 2.3.3 and I changed it to Android 4.2.2
I hope this helps to someone.
This problem was stupid(I mean this situation)... and I was using a stupid way to solve it.
update android API & SDK & anything else you can.
Open your library project's Properties window, go to [Java Build Path], [Order and Export]
Use [Up] [Down] button to make sort sequence like this:
After this, it still shows same error, so you have to re-build this single library project again.
Check top menu, [Project], [Clean...]
Clean that single library project, make it auto re-build.
That's how I solve all my library porject's same problem. (ActionBarSherlock, FacebookSDK, SlidingMenu, ViewPagerIndicator)
Sounds like a stupid solution, but just match this stupid situation.
Google, what the hell are you doing ?
In my case I am running 64 bit Linux (Linux Mint) and I had to install 32 bit libraries using sudo apt-get install ia32-libs
After installing the 32 bit libraries I restarted eclipse and cleaned the ActionBarSherlock library and all is good
Are you using the Android support library?
I had this error because I had a different version of the Android support library jar in ABS vs. the rest of my project. Make sure the support library jars you are using are identical in every project.
Strangely enough, this issue gets fixed when I add old flavors of Android SDK build tools: 18.x and 17.x
(For some reason, I uninstalled some of those)
I know there have been several problems like this, but in all of the threads that I have seen the problem is that the .xml files contain errors(or are named with capital letters or something).
In my case, eclipse won't even generate a R.java when I create a new project that only includes the standard "hello world" example files.
I have restarted, re-installed and recreated projects, but nothing seems to work so in my desperation I am hoping someone has seen a similar problem and knows a solution.
If you run a clean on the project it should regenerate all the generated java files, namely R.
In Eclipse, under the Project menu, is an option build automatically. That would help you build the R.java file every time modifications are made. The Clean... option is also there under Project.
I noticed a very similar problem upon upgrading the version of my Android Development Tools to 22. The solution was to install all updates for ADT by opening...
Help -> Install New Software
... and using the update site...
https://dl-ssl.google.com/android/eclipse/
... to install all outstanding Developer Tools updates.
First of all thanks for answering.
It turned out that after installing the ADT, some SDK packages had not installed, (even though I distinctly remember choosing to install them). I installed those packages and everything seems to be working fine.
Thank you
I had a working Eclipse setup with 3.6.2 and SDK tools from version 11, and it has been building my main project just fine for quite a while.
For a different project, I thought I needed to upgrade my SDK to the latest and greatest - at this point API 14 (ICS 4.0).
I cannot even reconstruct the steps I went through, but what happened was that my project would seem to build, but I would see that it would say that it was skipping a post-compiler step, and at the end I would have no APK.
I also noticed that it updated my .classpath so that the output path was bin/classes instead of .bin.
Along the way I tried updating my Eclipse to the latest version (Indigo 3.7.1) but this didn't help.
I solved the problem eventually with help from this post on the Google Android forum:
http://code.google.com/p/android/issues/detail?id=21031
For me personally the biggest issue seemed to be solved as follows (qutoe from comment 25 in the forum post)
"I seem to solve the problem with .apk files not being built automatically until run/debug is used (comments #10, #11 etc.). Go to Windows -> Preferences -> Android -> Build and uncheck "Skip packaging and dexing until export or launch" then restart Eclipse. Works for me."
But there is other useful material there. Different people with different projects seem to have different problems with this setup.
I still don't understand the change in the classpath, but it doesn't seem to matter.
In addition, I found a discussion of installing the ADT with Eclipse Indigo which was helpful here in Stackoverflow:
Eclipse Indigo - Cannot install Android ADT Plugin
I also found that I guess because of various uninstalls/reinstalls, for some reason it stopped excluding my .svn directories from the sources. This Stackoverflow post was helpful with that:
Why is eclipse trying to copy my .svn folders from src to bin, and how can I make it stop?
Finally: a tip for really and truly uninstalling Eclipse - everybody says there is no uninstall, and there isn't, but there is a directory that Eclipse leaves in your home directory (in windows 7 under c:\users\) called .eclipse -
Zap it if you really want to start fresh.
In addition, for less extreme measures, there is Project->Clean inside Eclipse, and you can invoke eclipse with "eclipse -clean" for additional cleansing effects. No idea what, but various helpful people along the way suggested trying that to solve problems.
Ah yes - when I first installed Indigo and tried to build, I got a warning that my Java Compiler Compliance level was not up to snuff, which was simply not true - I have only Java 1.6 installed on my machine.
See this post for somebody who had similar experience:
http://marakana.com/forums/android/general/374.html
For me, what worked was simply going to Project, Properties, Java Compiler, then click on Configure Workspace Settings, and click on Ok in the dialog. Didn't need to actually change anything. Just showed it that everything was ok!
Eventually I indeed did clean out my Eclipse and Android installations (including the aforementioned .eclipse directory, and there's also an .android directory in your home directory which you may want to erase if uninstalling the Android SDK Tools doesn't do that - this actually is uninstallable). Installed everything from scratch and then used the additional information provided above and now it's building my APK.
I hope this saves somebody the hours I spent getting my build back in shape.