I have a problem with creating Android Application project in Eclipse on my Mac. When I start Android Application Project Wizard after clicking "finish" in the last step, this window appears:
I've been trying to solve this for hours, but none of the solutions I've found on the internet worked for me (including this). I didn't try to reinstall eclipse itself, but to I don't want to do this. What's the solution to my problem.
UPDATE:
I removed Eclipse and sdk from my computer and downloaded the whole ADT Bundle from here and switched workspace but actually I am still getting the same Errors.
What I found up on the internet was that you could have upgraded your java. So this occurred. The solution to this problem for Mac is to edit the Eclipse.ini file to use java 1.6 .The code Below will work :
-vm/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands/java
Start with a clean slate. Unistall Eclipse and redownload - Eclipse is a very big program and can be very buggy at times for no reason. While it is not the quickest solution, ensuring that Eclipse was properly downloaded and installed will provide a good foundation for the future development of you Android applications. Did you install Eclipse just for Android, or did you have a pre-existing copy and want to install the Android SDK?
Related
I know there are a multitude of questions across various forums that touch on this issue but nothing has helped thus far.
I use Eclipse Photon for my IDE.
I installed the Android SDK via Android Studio.
I recently moved to a new machine and since then I get these errors when trying to build the project. Actually, the first image occurs when I first open Eclipse. The second image is what I see when building (I cleaned beforehand).
Many solutions suggest reinstalling platform tools/build tools/the entire SDK etc.
So, I did this:
1) Closed down Eclipse
2) Opened Android Studio and went to SDK Manager
3) Unchecked and uninstalled all the options highlighted in the images below.
4) Once uninstalled I restart Android Studio and reinstalled all of them.
5) The errors noted at the start of this post persist.
Any ideas what I can try next? It seems every machine move/upgrade causes build issues. It's the main reason I dislike coding for phones, it's not the coding, it's the dev environments!
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 am a new Android developer (4 weeks into porting my iPhone app to Android). I have 8 projects (the app, and 6 small UI experiments, and a vanilla Hello World project that I just created with Eclipse). All fail to compile, and the issue is that every reference to the generated file R is flagged as "R cannot be resolved to a variable".
Up until yesterday afternoon -- every project compiled and ran (albeit very slowly) in the Android emulator. I've changed something, and since yesterday, all projects fail to compile, all in the exact same manner "R cannot be resolved to a variable". I every case, the generated files are missing. I believe they disappeared as I tried to clean and rebuild each project in the course of debugging this problem.
Two things that I know changed when this problem started, but that I can't say caused the problem, were: 1) shifting to debugging on a real Android device (a Samsung Galaxy Tab 2, which worked like a champ after struggling with the slow emulators), and 2) allowing Android (and perhaps Eclipse) to update themselves from the web.
I've spent many hours trying other user's suggestions and none have helped. Most suggestions refer to file naming issues, xml syntax errors, but I haven't changed these files and filenames since compilation was working. I have tried:
cleaning and rebuilding the projects
checking for subsequent updates to the Android SDK (and there were 2 subsequent ones)
Eclipse->File->Android Tools->Fix Project Properties
making small source changes to force rebuilding
rebooting Eclipse, as well as the Mac host, adb, the emulator, the Android SDK Manager
deleting a project, restarting Eclipse, and adding the project back in (bad idea - this fails with an error "Failed to load properties file for project 'ListViewFragmentTest'"
creating a brand new Android App project, which has worked many times before, but now fails
There's something going systematically wrong, and while I won't claim all these projects are bug-free, they did run up until 6pm yesterday, and then all stopped compiling thereafter.
I wonder if anyone has other suggestions, before I embarking with a complete reinstall of the development environment?
My environment is:
Macbook Pro (OS X 10.7.5, 8GB RAM, 2.53GHx Core i5)
Eclipse (Indigo Service Release 2, Build: 20120216-1857) (too old?)
Android SDK Manager Rev 22
Android SDK Tools (22), Platform Tools (17), Build Tools (17)
API's 11-17, all up-to-date
Seems like lots of people experience trouble with missing generated files (R), and I have had trouble when I've had layout XML errors as well, but that doesn't seem to be causing this problem. Thanks in advance for your help!
I am not sure but you are facing issue of R.java file is not getting generated after updated with ADT rev 22.
If this is the case then here is the solution:
Hope you know Android studio has gradle building tool. Same as in eclipse they have given new component in the Tools folder called Android SDK Build-tools that needs to be installed. Open the Android SDK Manager, select the newly added build tools, install it, restart the SDK Manager after the update.
Check in the Java build path library, whether "src" check box is checked or not.
If you are using any additional Libraries then make sure libs/android-support-v4.jar is same for project as well as the Libraries.
Thanks everyone. None of these suggestions resolved my problem. And while I'm curious as to why it happened, I was more impatient with not making any progress. I've reloaded Eclipse and the Android tools (this time with the bundled version from developer.android.com), and everything is working smoothly again.
I'm using Windows 7 and installed the 64 bit version of Eclipse 3.5.2. I then installed the Android ADT plugin, but when I try to configure it in the Windows > Preferences dialog, the Android Plugin doesn't show up in the left pane. Instead I see DDMS. This prevents me from specifying the location of the Android SDK (unless there is another way) to give me the appropriate templates and such.
Someone posted a fix to this that includes setting the permissions of Eclipse, but that didn't work for me. I tried installing the Android Plugin from both online installation (thru the URL install) and the offline Archive method.
If you're running Windows Vista or 7, make sure you right-click Eclipse and RUN AS ADMINISTRATOR. I literally spent six hours figuring this out, and this was what fixed it.
Dear people from the future:
I had roughly the same problem in linux, except that i didn't see anything at all but vanilla eclipse after installing. by combining both previous answers i got it to work:
start eclipse with sudo eclipse -clean, install the plugins and restart eclipse. the plugins showed up including the welcome screen that's supposed to be there.
after that it should work when running as regular user as well.
works for both the android sdk and the gwt sdk. (and probably other eclipse plugins)
Remove the plugin, then restart as follows:
eclipse -clean
Now try reinstalling the ADT from the online installation
For users having similar problem and not luck with other solutions:
I have windows XP but had same problem. I realized that I had JDK5/bin folder in my PATH environment variable (though my JDK_HOME was pointing to JDK6), as soon as I modified the PATH to replace bin of JDK5 with JDK6, the Android buttons on eclipse (after restart with -clean) along with Android option in Preferences & New Project showed up. (Weird eh!)
Also, consider to install the bundle android installation having eclipse with pre-configured Android SDK if a new eclipse installation doesn't matter to you
http://developer.android.com/sdk/installing/bundle.html
The above answers do not confront the heart of the problem. There is a feature in Windows 7 that prevents downloaded files from direct access of local files. All of the state is perfectly maintained in the Eclipse workspace instance. The problem is easily resolved by doing the following:
Find the "Eclipse" executable
Right-click on it.
Click "Properties".
Select the "General" tab.
Look for -> Security: "This file came from another computer and might be blocked..."
Click Unblock.
This is a much better solution than uninstalling and reinstalling the ADT or Eclipse which can be a pain.