3

Has anyone been successful in using 64-bit Eclipse for Android 2.3 dev on 64-bit Windows 7?

Please answer positively only if, when you invoke the emulator via Eclipse's Run (Ctrl+F11), your app-to-be-debugged's APK is installed automatically onto the Android emulator and you are running this same exact configuration:

  1. Windows 7 Ultimate 64-bit.
  2. JDK 64-bit (jdk-6u23-windows-x64.exe installed.)
  3. JDK 32-bit (jdk-6u23-windows-i586.exe installed.)
  4. Eclipse Classic 3.6 64-bit (eclipse-SDK-3.6.1-win32-x86_64.zip)
  5. Android 2.3 SDK Starter Package

If you are able to fully use 64-bit Eclipse for Android 2.3 dev on 64-bit Windows 7, please describe the steps you performed to make this happen.

As of now, the following steps did NOT work for me:

  1. install the 64-bit JDK
  2. install the 32-bit JDK
  3. unzip android-sdk_r08-windows.zip to C:\android-sdk-windows
  4. append C:\android-sdk-windows\tools to %PATH% in System env vars.
  5. Run C:\android-sdk-windows\tools>android.bat
  6. Install ADT Plugin via Eclipse
  7. Create "Android 2.3 - API Level 9" virtual device via Eclipse
  8. Window > Preferences > Java > Installed JREs: [Search...]
Android Eve
  • 14,864
  • 26
  • 71
  • 96
  • 1
    What's the actual problem you get? I have noticed a lot of problems being reported with 3.6 and ADT... you may want to try stepping back to 3.5, it might solve your problem (it has for others). – Reuben Scratton Dec 21 '10 at 14:16
  • @Reuben Scatton, thanks for your suggestion. I have a perfectly working Eclipse 3.52 on Windows XP -- all 32-bit. My question is specifically about the configuration above as from everything I have read, NOBODY managed to have this 64-bit configuration working. Perhaps Google is right in stating that 64-bit Windows 7 is not supported? – Android Eve Dec 21 '10 at 19:11
  • 1
    I'm using Win7 x64 Pro (not Ultimate, but it doesn't matter in that case), and eclipse-SDK-3.6.1-win32-x86_64.zip + installer_r08-windows.exe (Android SDK installer instead zipped). Running/debugging works just fine. What 'error'/etc. you get? PS. I'm new to Eclipse/Android/Java, and I didn't do anything special, just extracted Eclipse, installed and downloaded SDK. – Krystian Bigaj Dec 23 '10 at 14:23
  • @kibab Wow. How did you do that? Which JDK did you install? I don't receive any error messages but Eclipse won't install the APK after starting the emulator, as described here: http://stackoverflow.com/questions/4461575/64-bit-eclipse-wont-install-apk-on-android-emulator . – Android Eve Dec 23 '10 at 15:07
  • 1
    I have JSDK Update 18(1.6.0.180) and JSDK Update 20 64-bit(1.6.0.200) - at least this shows in Uninstall panel. As I remember there was some bug in JSDK (latest), and sb. suggested to install older one - I'm even not sure if this was about JSDK or Eclipse, this was about 2-3mo. ago when I made first attempt to learn Android (which failed because of idiotic Eclipse/'Linux' stuff - forcing me to spend days to learn how to setup tools/sources/env, which is NOT useful for dev. at all). – Krystian Bigaj Dec 23 '10 at 15:42
  • @kibab Thanks and +1. Your JDK are different than the ones I tried (always the latest and "greatest"). Like you, I wasted way too much time trying to make 64-bit dev env work. At this point I simply don't have the time to experiment with yet another version, unless I am given and exact versions and sequence that is guaranteed to work. – Android Eve Dec 23 '10 at 22:30

6 Answers6

3

I received 3 great answers here although none of those described configurations really match the original configuration described in the question, but...

The last 2 answers (especially the one from @Nicholi) prompted to spend the time on yet-another-round of pulling my hair in an attempt to find a solution to an unexplainable problem.

And I found it! My own configuration now works on 64-bit Windows 7 and so the short answer is: Yes.

Here are the detailed steps, in order, that worked for me (cut & keep):

Step 0:

***********************************************
****** UNINSTALL THE COMODO FIREWALL !!! ******
***********************************************

Comodo Firewall, AKA CIS, turned out to be the sole problem leading to the time wasted between December 2010 (when I posted this request for help) and February 2011 (When I finally nailed the problem down). Note: Disabling the firewall doesn't help, only complete uninstall really works.

Step 1 (JDK 6 64-bit):

Create %JAVA_HOME%: C:\Program Files\Java\jdk1.6.0_23
Append to %PATH%:   C:\Program Files\Java\jdk1.6.0_23\bin
Run:                jdk-6u23-windows-x64.exe

Note: It is not necessary to install the JDK into C:\Java. Sticking with the Windows Folders conventions is preferred because it helps you remember which package is 64-bit and which is (still) 32-bit.

Step 2 (Eclipse Classic 64-bit):

Unzip eclipse-SDK-3.6.1-win32-x86_64.zip into C:\eclipse

Note: It is critical to have the eclipse directory directly under C:\ and not under "C:\Program Files" (otherwise, ADT Plugin install will incur missing packages problems).

Step 3 (SDK Starter Package AKA "Android SDK"):

Create %ANDROID_HOME%: C:\android-sdk-windows
Append to %PATH%:      C:\android-sdk-windows\platform-tools 
Run installer_r09-windows.exe and install to C:\android-sdk-windows
 > Check 'Start SDK Manager'
   > All are selected. Accept. Install. Yes, restart ADB.

Step 4 (ADT Plugin for Eclipse):

Help > Install New Software > Add... 
  Name:     ADT Plugin
  Location: https://dl-ssl.google.com/android/eclipse/

  Check "Contact all update sites during install to find required software'!!!

Work with: All available sites
  + Developer Tools
    + Android DDMS              9.0.1.v201101191456-93220
    + Android Development Tools 9.0.1.v201101191456-93220
    + Android Hierarchy Viewer  9.0.1.v201101191456-93220
  > Next
  > Next
  > Finish
  > Restart Eclipse

Step 5 (Android Virtual Device):

Open Eclipse. Then:
  Window > Android SDK and AVD Manager
   > Virtual Devices [New...] 
     Name: AVD23
     Target: Android 2.3.1 - API Level 9
     SD Card: 1024 MiB
     [Create AVD]
Android Eve
  • 14,864
  • 26
  • 71
  • 96
  • 1
    I'm running Eclipse 3.6.1 with the latest Android plugins under Win 7 home premium 64bit with 32 and 64 bit Java installed. I don't have either ANDROID_HOME or JAVA_HOME environment variables set and everything works fine. (I do have the android tools and platform-tools directories on PATH.) – Ted Hopp Feb 03 '11 at 18:42
  • @Ted Hopp Thanks (and +1) for your clarification. I gather those env vars are for *conveniently* running from the command line. – Android Eve Feb 04 '11 at 01:00
  • Actually adding those to the PATH environment variable would be for simple command-line use. I also have mostly copied those from other examples I've seen, which may be related to *NIX setups for the android SDK. Something somewhere in the SDK may possibly use them (or did at some point in time in the past). Hard to find any documentation on it :( – Nicholi Feb 14 '11 at 17:10
2

I myself have never used the Eclipse "classic" version, I always get the Java version as another poster mentioned (the 64bit version). Personally no idea what the difference is. I am guessing this is where your problem may stem from?

It works perfectly on Windows 7 x64 (Home Premium here), 64-bit and 32-bit JDKs installed, latest Android SDK and ADT plugin. I'm not sure which JRE is actually used, never bothered to find out (wouldn't be surprised if its 32bit). Also the JDK versions I used (quite awhile back) were 6u21, since then my 32bit version has updated to 6u23 but 64bit has not. Couldn't tell you the exact order as I don't recall (it was quite awhile back). Likely I installed the JDKs first, then extracted Eclipse, install/downloaded Android SDK, then installed ADT plugin.

Has always started up emulator fine, installs APKs, and debugs as expected. I also do alot of dev'ing on my Nexus One.

One recommendation I have seen alot is NEVER install any of the tools to the typical "C:\Program Files" because of spaces in filepaths. Why this is still a problem in 2011 I will not know, but putting Eclipse, JDK, and the Android SDK all straight off the root of some drive is likely to lead to significantly less issues apparently.

Edit: I uninstalled my current versions of Java, and removed eclipse/android sdk to startover

  1. Installed jdk-6u23-windows-x64.exe to C:\Java
  2. Added JAVA_HOME env variable pointing to C:\Java\jdk1.6.0_23
  3. Added Java bin dir to PATH env var ;C:\Java\jdk1.6.0_23\bin
  4. Extracted eclipse-java-helios-SR1-win32-x86_64.zip to C:\eclipse
  5. Installed installer_r09-windows.exe to C:\android-sdk-windows
  6. Downloaded necessary SDK versions
  7. Installed ADT plugin through Eclipse interface, point to android SDK dir
  8. Added ANDROID_HOME env variable pointing to C:\android-sdk-windows
  9. Added Android platform-tools dir to PATH env var ;C:\android-sdk-windows\platform-tools

After this everything seems to work fine (except for DDMS in Eclipse, still fidgeting with that). And that is without the 32bit version of Java installed (neither JRE or JDK). Only 64bit is installed.

Nicholi
  • 1,083
  • 19
  • 33
  • 1
    on the offchance that you were still interested, edited my response with steps I took to use 64bit eclipse + 64bit Java works for android apps – Nicholi Feb 02 '11 at 19:28
  • @Nicholi Yes, I am still interested. I just tried @Prashanth's method which looked very promising and I got the same exact results. Something in the setup instructions is **assuming** one or more things and no one (including myself) seems to have a clue as to what it is. I will try your method shortly. Thanks. – Android Eve Feb 02 '11 at 21:40
  • +1x2 for both comments, even before it succeeds... (why am I so pessimistic about the outcome?) – Android Eve Feb 02 '11 at 21:47
  • BTW, notice this seemingly innocent comment nastily hiding in the ADT section (http://developer.android.com/sdk/eclipse-adt.html) instead of the Eclipse section: **For Eclipse 3.5 or newer, the "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.** (AFAIK this is a very recent addition) – Android Eve Feb 02 '11 at 21:56
  • @Nicholi One more comment before delving into your setup method (must be super careful, paying attention to **finest** details when doing so): I can't uninstall the 32bit version of JRE because I need it for OpenOffice.org (which is still 32-bit). – Android Eve Feb 02 '11 at 22:01
  • @Nicholi I am sorry to inform you that even your excellent step-by-step sequence didn't work for me. There must be something in my system that makes it behave horribly like this. A great development environment shouldn't be **sensitive** to a configuration of a perfectly working Windows 7 64-bit system. I have no idea what makes it behave likes this but I am determined to solve the problem once and for all. – Android Eve Feb 02 '11 at 23:54
1

I'm still troubleshooting it, as my configuration is totally messed up - many versions of java and mix of 32/64 bit, so I'm starting from scratch.

I noticed one thing, which might be solution to this problem. I found 3 java exe files in my windows\system32 folder. That's why, when u run 'java -version' from the command line, you get java 7! Even when you amend system %PATH% to have java 6 there, it won't work until you remove executables from system32.

jszoja
  • 339
  • 3
  • 7
1

Is the solution to use eclipse-java-helios-SR1-win32 instead of eclipse-java-helios-SR1-win32-x86_64 when using a Windows 7 64 bit OS on a 64bit machine?

jps3318
  • 11
  • 1
  • +1 for the first attempt to help after over 10 days. What is eclipse-java-helios-SR1-win32-x86_64? How is it different from eclipse-SDK-3.6.1-win32-x86_64.zip? BTW, eclipse 64-bit works very well on Ubuntu 10.04: http://stackoverflow.com/questions/4576788/which-jdk-for-android-development-on-ubuntu-10-04-64-bit – Android Eve Jan 04 '11 at 05:07
1

Hope this helps, if anyone else is having this issue.

Following configuration works perfectly fine for me.

My sequence of steps:

  1. Install 64 bit JDK. Update PATH and JAVA_HOME env variables.
  2. Uncompress Android SDK and get all the required versions 7, 8 and 9. Add ANDROID_HOME env variable.
  3. Uncompress Eclipse 64 bit and install the ADT plugin and then configure the Android SDK in Preferences page of Eclipse.
Prashanth Babu
  • 208
  • 2
  • 5
  • I just tried your method **exactly** as you described (including Eclipse jee instead of classic!) and... still no go. Something is fundamentally flawed in the the Android Dev Tools setup process if something so trivial cannot be produced or no easy diagnostic and troubleshooting information can be retrieved to get help. – Android Eve Feb 02 '11 at 21:38
  • Anyway, +1 for the attempt to provide ordinal steps. – Android Eve Feb 02 '11 at 21:44
1

Thanks for the collective wisdom which has enabled me to restore the ADT functionality within an hour of reading this page. I had to fix one more item, eclipse refused to compile my android application and complained about all sorts of nonsensical problems e.g. unable to find {relative-path}\R.java even though I could view it in eclipse and from the command line; and build path problems.

I discovered it was using a 32-bit JRE (Window->Preferences->Java->Installed JREs) of C:\Program Files (x86)\Java\jre6 I added an entry for the 64-bit JRE C:\Program Files\Java\jre6 and selected it as the default JRE.

My android project then built cleanly again :)

JulianHarty
  • 3,178
  • 3
  • 32
  • 46