Setting Up Eclipse for Android SDK? - android

I'm having trouble setting up the Android SDK. I've set up Eclipse before but it didn't work, so I uninstalled it, but I'm trying again.
Does Eclipse need to be extracted to a particular folder for it to work? Where should I extract to?
Edit:
I'm using Eclipse 3.5 on Win7 Ultimate x64

Eclipse should be one of the most straightforward installs you have ever done. Make sure you have a Java SDK installed prior to extracting Eclipse. Otherwise it should work out of the box. Be sure not to move the eclipse executable out of the directory that you extract it to (make a shortcut to move instead).
The Android SDK should also be largely painless. Use the tool provided with the SDK download to setup the versions you want. The documentation is pretty good for this. (see Brian's link)
It can be much trickier to get the drivers for specific handsets working though, so you have that to look forward to down the road. They will come from the individual manufacturers developer websites.
Also is this for Win, Linux, or Mac? I will link you a walk through for the one you need.
Video tutorial for installing Android SDK on Win7 - http://www.youtube.com/watch?v=YeWH6Bj1DYw&feature=related
Installing Eclipse on Win 7 64bit:
http://lingpipe-blog.com/2009/03/05/eclipse-ide-for-64-bit-windows-and-64-bit-java/
How can I install eclipse on Windows 7 64-bit?
JVM - http://www.eclipse.org/downloads/moreinfo/jre.php

No, Eclipse can be extracted anywhere. Make sure you follow the steps detailed in the guide "Installing the SDK".

Ignore the last link to the JRE provided in Andrew's answer, you need the Sun JDK (5 or 6) instead of just the JRE (The Java Development Kit can contain multiple Java Runtime Environments). The official documentation Android provides makes this distinction quite clear. You need the JDK. --> http://developer.android.com/sdk/installing.html#Preparing
Also, the ADT plugin for eclipse sometimes doesn't update correctly. In that case, try to manually remove the 's' from the 'https://' and if that doesn't work, click on one of the tabs of the dialog and look for the checkbox which forces the use of secure mode, and then of course, make sure there is an 's' in the 'https://'.
Also make sure you've updated your system environment variable called 'path' to make sure the tools inside the tools/ folder from your android sdk folder are accessible from anywhere your command line/Eclipse might decide to call them from.

Related

Why do I get Android errors on Qt projects loading?

I do not use any Android features of Qt, my only purpose is to program some little softwares for Windows with minGW and QMake, no other project configurations is relevant for my needs. I'm simply curious if I missed a part, it does not affect the fonctionnality.
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable
to point to your Android NDK
And a bunch of other errors like that. Its my 4th clean install of 4 different version of Qt bundle, (now I carefully unselect everything except minGW32 and it still showing up!) God's sake why?
Did I missed a part on How to use Qt? Do I need extra-steps to remove it manually on a project creation?
If you want to code for Windows: just setting up your project with default setting (without Android/IOS setting).
If you want to code for Android: The problem was that the file wasn't the correct NDK file. Make sure you get the correct NDK from the website. Other than that it is pretty easy just unzip it and that directory is the root directory.
So if I understand, I can't remove "Android options" from Qt as it is pre-installed for all platforms.
Then yes, even if I don't use it, I must install Android NDK. Then continue to unselect the kit. Then these Error messages will disapear.

Quickest, least hassle way to get Android SDK

I want to target Android from Unity. I'll be teaching a class so want a fast and easy deployment of the SDK without messing with 30 students' different laptop setups.
Is it possible to download just the Android SDK for a given OS without going via intermediaries (SDKManager, Studio etc)? Where can it be found and are any installation steps required?
EDIT: Thanks to a comment on this question and a close look at what Studio was doing when it installed suggests this link works for Windows:
https://dl.google.com/android/repository/platform-tools_r26.0.2-windows.zip
Is there somewhere I can find a definitive list of such links? And is it sufficient just to grab and unzip this archive? Unfortunately I've installed Studio now so my environment is a bit hosed from a testing perspective...
UPDATE: I've now discovered that the Android SDK itself seems to require a full JDK installation (not just JRE). For that rather tangential reason it seems unlikely I can use this in my specific context.
I'd still be interested to know whether there's a place to grab the latest SDK as a direct download, in case I decide to try to repack these dependencies for my students.

Use Sublime Text 2 to develop Phonegap applications for Android

I've been using eclipse to develop Android apps with phonegap until, a few weeks ago, I decided to try Sublime Text 2. I found it to be so much better than the eclipse editor so I would like to keep using it. Only thing I'm missing is a quick way to test the app on the device inside Sublime.
Luckily, someone else also had the same idea and developed a plugin for this:
https://github.com/Korcholis/Andrew
Sadly, I cannot get it to work, I installed ant and pointed the plugin to adb but then nothing happens when I try to create a new project (and there is no error message in the console).
I also found this other plugin:
https://bitbucket.org/ucomesdag/sublime-android
But I have no idea on how to install and run it.
Did someone else found a way to do this?
A quick update into 2014.
As of PhoneGap Cordova 3.0, it is no longer required to develop Android apps via eclipse. You are free to use any code editor or IDE you wish as app building is done independently from eclipse via a simple command line.
cordova run android to package the .apk and install on any active devices detected by adb or
cordova build android to package the .apk only.
In your case, you can keep using Sublime and pop in the cordova run android command whenever you ready to go on a test run.
While I agree with Insane Coder that you should stick with supported IDEs to develop for Android, according to this link and existing Sublime Text 2 Ant support, you could build and develop your android project with this IDE (It will just take some time to set it all up... as opposed to using a supported IDE like IntelliJ or Eclipse).
Using PackageControl, look for "Ant". That will install syntax highlighting for Ant. Another plugin that enables the build command (ctrl+b) to work for Ant files, "Super Ant". You should be able to code for android in sublime text 2 with those installed.
On another note... Do you use windows? The Andrew project you link to, seems to have Windows compatibility issues. Apparently related to locating the "SDK" (he says sdk in Andrew's github page but, probably he means JDK?) in your hard drive. Which is probably a hassle because Windows typically installs stuff to "Program Files" and in code, that turns into "Progra~1" because of the space. In the link I give you there is another approach to it, so when you install the JDK set a folder that has no spaces in its name, like c:\java\jdk1.6.0_02 or something else that strikes your fancy. The problem you could be having with Andrew is that it isn't finding the jdk in your hard disk.

Android: Is it possible to cut/paste android SDK and use it?

I am using eclipse as IDE for android programming. I have update android SDK to API 9. these are installed on my laptop.
Now, I want to transfer all of these to my PC. On my PC, I didn't have eclipse and SDK.
My question is, may I copy folders of eclipse and SDK from laptop and paste it on my PC? can I use it and create new project after this?
Thanks
Try and see is the best answer to this.
My suggestions is to launch eclipse on your desktop and get ADT.
Otherwise I think you have to be careful where your Android SDK is. if you put in Eclipse then it should work.
(In my case I needed the SDK and NDK to be at the root of C:)
bottom line there is not better way than a clean installation
Yes, you can just copy the whole project (your app) folders over to your PC. In Eclipse, use the File/Import… command, then select General/Existing Projects into Workspace to add the copied project/s to your Eclipse workspace.
As for the Android SDK folder, I wouldn't transfer that one over, and just run the SDK installer for Windows again on the second PC to be sure.
Yes Very much. Just copy and paste. This should work in most cases. (Except if you try to transfer a 64bit eclipse version to a 32bit machine. If this happens just download the eclipse 32 bit version and point your workspace and android SDK to the copied one).
Copy paste has and advantage if you are planning to generate debug key (need this if you are using Location Information using Google API). If you copy paste, you dont have to keep generating a new key per machine.
Yes, you can copy all the things as far as you keep respecting the path changes. Keep track of them and change paths in Eclipse. You must have Java although.

New to android dev

I am new to android dev, own an HTC Eris Droid (OS = 1.5 or 1.6 I believe). I am primarily a Microsoft .NET developer and am trying to figure out where to start.
What dev IDEs are suggested. I've seen the droid dev site and they suggest Eclipse. But which one?
Will installing Eclipse and the JRE interfere with .NET development?
What else will I need to get started? My OS is Win7.
TIA
As a .NET developer who has recently been looking at Android development, I can give you the steps I used:
Download Eclipse Classic 32-bit (as recommend by the Android docs) and extract it to a folder where it has write permissions (I use %homepath%\applications\eclipse\3.5\)
Download and extract the Android SDK to a permanent home and run SDK Setup.exe. Let it download/install all the packages
Add ANDROID_SDK_HOME\tools (expanded, obviously) to your %PATH% system environment variable in System Properties (WIN+BREAK)
Install the ADT (Android/Eclipse integration) plugin for Eclipse
Then to checkout the samples:
Create a workspace and a new Android project
Copy the contents of one of the samples (ANDROID_SDK_HOME\platforms\android-x.x\samples) into your project directory
Refresh your Eclipse view
I also strongly recommend checking out the Android Developer Guide and, in particular, reading the Application Fundamentals. It really gives a good overview of the terms used and the lifecycle of an application.
After that you can dive into the samples (installed by the SDK) with a little bit of clarity.
For development you will need*:
Java JDK - the JRE is not enough for Java development.
Eclipse - it doesn't really matter which "package" you choose, but for your needs the basic (smallest) one should be enough.
Android SDK + ADT
This should have no effect on .Net development, or on anything for that matter.
You don't actually need Eclipse and ADT, but since you asked about IDEs...
The android developer site system requirements says any version of Eclipse after 3.3.
Eclipse uses plugins to support different configurations that's why www.eclipse.org/downloads/ has so many different versions - they're the core IDE with different plugin configurations.
I'd recommend the 'Eclipse IDE for Java Developers' as this will have what you need without too many bits you don't - you can install additional plugins easily.
Of course, you'll also need to add the Android SDK once you have Eclipse - this is a set of tools and plugins that work with Eclipse.
Installing Eclipse and the JRE (Although you want the JDK - The Development Kit rather than just the runtime) will not interfere with your .Net development.
This version of Eclipse should work fine. Just select a download mirror.
You probably already have the JRE installed, but you should install the JDK from here.
Then you need to get the Android SDK, and ADT
After you install the Android SDK, it may be useful to create multiple virtual devices using the included Android emulator running different versions of Android. This will help you to learn features included in Android up to version 2.1 instead of being limited to your current device running 1.x.

Categories

Resources