I am having serious problems in Configuring ADT with Eclipse. I am using Windows 7 Home Premium version.
The Eclipse (64 bit) that I am using is:
Eclipse Classic 3.7.1
Eclipse Java EE IDE for Web Developers.
Version: Indigo Release
Build id: 20110615-0604
Java code runs without any problem in this Eclipse. For running Android:
at first, I went into Eclipse-> Help menu and then Install New Software.
Clicked Add, named it ADT and for location used: http://dl-ssl.google.com/android/eclipse.
The new window that appears, I have clicked all of those boxes and choose Next. Upto this point, everything is OK, ADT is installed and I am be asked to restart Eclipse. When Eclipse launches, a new window appears and asks me to either install the Android Software Development Kit (SDK) or choose an existing SDKs location. I chose to install Android Software Development Kit (SDK) (I checked all the options). I have set SDK location to: C:\My_Workspace\Android_SDK. After everything finishes I see two errors in the Eclipse console:
[2012-01-02 14:29:37 - DDMS] DDMS files not found: C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found: C:\My_Workspace\Android_SDK\platform-tools\adb.exe C:\My_Workspace\Android_SDK\tools\hprof-conv.exe C:\My_Workspace\Android_SDK\tools\traceview.bat
Note, I have tried to install the SDK at the default location given by Eclipse. But I see the same errors.
If I restart Eclipse an error appears saying:
"Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'".
If I click into Window ->Android SDK manager, I get another error message saying:
"location of the Android SDK has not been setup in the preference."
If I go Window->Preference->Android, I see that, the SDK location is set to "C:\My_Workspace\Android_SDK"
But on top, there is an error message saying, "Could not find folder 'tools' inside SDK 'C:\My_Workspace\Android_SDK\'."
Inside the C:\My_Workspace\Android_SDK\ folder I see only two sub folders:
add-ons
platforms
But there is nothing inside these folders.
Inside "C:\Users\anis_huq.android" folder I see a folder called AVD (contents empty) and file called "ddms".
What is going on? I am confused!
P.S. the post: Could not find folder 'tools' inside SDK does not help my cause.
Problem solved after 1.5 days of work. This is how:
When you get the error:
[2012-01-02 14:29:37 - DDMS] DDMS files not found:
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\platform-tools\adb.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\hprof-conv.exe
C:\My_Workspace\eclipse-SDK-3.7.1-win32-x86_64\eclipse\tools\traceview.bat
[2012-01-02 14:30:47 - DDMS] DDMS files not found:
C:\My_Workspace\Android_SDK\platform-tools\adb.exe
C:\My_Workspace\Android_SDK\tools\hprof-conv.exe
C:\My_Workspace\Android_SDK\tools\traceview.bat
go to the site: http://developer.android.com/sdk/index.html and download, install;
installer_r16-windows.exe
After the installation, you will still see some errors like:
Fetching
https:// dl-ssl.google.com/android/repository/addons_list-1.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/addons_list-1.xml,
reason: peer not authenticated Fetched Add-ons List successfully
Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated Done loading packages. Fetching URL:
https:// dl-ssl.google.com/android/repository/repository-5.xml Failed
to fetch URL
https:// dl-ssl.google.com/android/repository/repository-5.xml, reason:
peer not authenticated
The problem is not so evident from the error messages. We figured that, the HTTPS is actually causing the problem. So, start
Android SDK Manager->Tools->Options and now CHECK the box that says:
force https://... sources to be fetched using http://
and then click Packages->Reload.
Everything will be installed as your wish! Now run Eclipse->Window->Preferences->Android and set the location of the newly installed Android SDK (i.e. the location of "android-sdk" folder). And you are ready to go.
1.5 days wasted for this.
Try installing the Android SDK separately first. Then get Eclipse configured appropriately. You might need to run the SDK installer as an administrator in order to have some permissions set up appropriately.
Have you tried downloading ad installing the Android SDK manually, then pointing Eclipse to that location? You will need to run "SDK Manager.exe" to download at least one platform...
Also... Make sure you don't have any spaces in the path to the Android SDK and Eclipse or you might get strange errors.
In the last time I face all the time with such strange errors. The solution in these cases usually is the following.
I guess that you use JDK 7. Android SDK is not compatible with JDK 7. You have to use JDK 6 or JDK 5 (but 5 is too old). Am I right?
Remember the path where you install the android sdk and provide the correct location at window>preferences>android. On my windows 7 system the location is C:\Program Files (x86)\Android\android-sdk. After you provide location in preferences, click apply.
I had this too and just solved it. For me, it turned out that I didn't have all the libraries like the tools package.
Other things to keep in mind that helped me overcome related errors:
1) When giving urls from where to download, if the https doesn't work, try http
2) Run your eclipse as administrator if u r running it from Windows 7 - that will help you avoid permissions problems.
Related
I'm having a problem in the Android SDK Manager in which it doesn't show that I have any packages available to install:
When I first installed the SDK, the only line I saw there was the Android SDK Tools. I was able to add the Platform-Tools and Android 4.2 package my copying and pasting from the Android ADT bundle that I downloaded separately.
The log is showing no issues:
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
Done loading packages.
And I can see available packages when I open up the XML the package URL returns.
Things I've tried:
1. Messing with the proxy in Tools > Options. I've tried both 127.0.0.1 and blank.
2. Opening the SDK Manager from Eclipse and directly (regular and as Administrator)
3. Uninstalling and re-installing the Android SDK. Downloading the latest versions of everything.
My system:
Windows 7 x64
Eclipse 4.2.1 Juno
SDK Manager 21.1
ADT 21.1
Any ideas? I suppose I could download the files by pulling URLs directly from the XML, but that isn't ideal.
Edit:
Since I can pull the repository-7.xml file using a browser, this doesn't look like a Firewall/AV/Network setup issue. It's a matter of the SDK Manager not loading up the package information it pulls back through the XML.
I got the same problem. For me the solution was putting a check on the "Force https://... sources to be fetched using http://..." box. It's on Android SDK Manager's preferences screen, below the proxy settings.
Also if this doesn't solve your problem, instead of downloading SDK again, I suggest you to download the Adt Bundle
So I was finally able to see all of the available packages. I accidentally hit the SDK Manager icon in Eclipse instead of the AVD Manager I meant to press:
And all of the available packages showed up.
Also, now when I open the SDK Manager using any of the other methods (directly from SDK directory or using the Window > Android SDK Manager menu option in Eclipse) all of those missing packages are now showing up.
i had the same problem.
and nothing works for me, nor clearing cache, nor restart eclipse, nor running sdk manager from eclipse, nor forcing https (from sdk manager options)
but every thing works fine when i used proxy!!
sdk manager-> tools-> options -> http proxy server
I know that I'm kind of late to the party, But I wanted to share my experience with this issue.
It turned out that the underlying Logger module used was the SL4J Android edition. Because I had overridden the version (using an external JAR file) that the SDK Manager used, a lot of things went wrong when it tried to load the Logger class. I discovered this when i tried to run
android-sdk\tools\android.bat update sdk --no-ui
which showed me an exception thrown by the ClassLoader of the logger module. Removing every trace I had of the SL4J modules in my %JAVA_HOME%\jre\lib\ext folder solved ALL of my problems.
I know this is old, but just wanted to add for posterity. I had this same problem and it turns out I had previously ran the SDK Manager as root (Ubuntu Linux). My user account didn't have permissions to overwrite the files and update the list. Once I corrected the permissions, it ran fine.
On Windows, if you are running the SDK Manager directly from ~Android\android-sdk directory, just right click and Run as administrator. That did the trick for me anyway.
Are you opening the Adroid SDK when you unzipped the folder downloaded?. Becouse i had a problem like you, and the solution was that i am taking a wrong folder path.
What i did:
Downloaded again the sdk and put it in C:/ (Another Path)
Check in this path if i get the same result.
install the new tools and android version from the new path.
becouse i see that u have your folder in C:/ProgramFile/Android......... and i have in this path only that i have installed.
Open Android SDKManager->Android SDK->SDK Update Site
Click on Launch Standalone Android SDK Manager you will see the packages.
On SDK manager go to tools -> options and select force https checkbox; now you should see all
Okay. I'm kind of at my wits' end here. I've been trying for about 2 days to set up Titanium Studio to recognize and connect to the Android SDK (Windows 7). I have tried multiple solutions (below) with no luck. There's got to be something I'm missing. I've tried Google and the Titanium developer guides. So this is my last straw. Any ideas?
Android SDK home path is C:\Android\android-sdk (to avoid spaces with "Program Files")
installed all SDKs (3,4,7,8,10,11,12,13,14,15), their Samples, and all Google APIs
installed all "Extras" packages
Added both the Android tools and platform-tools directories to Windows' PATH variable
Copied adb.exe from platform-tools to tools as Titanium likes to look there for adb
Installed the current master build of Titanium SDK for Mobile Devices
Created Android Virtual Devices (AVDs) for SDKs 7 and 8 (Titanium's required SDKs)
Restarted adb server and computer itself after each change
On the Titanium 'Dashboard' tab, under 'Configure', I get:
An Android SDK is missing. Titanium requires Android platforms 2.1.* and 2.2.*
When attempting to set the default Android SDK path in 'Preferences', I get:
Could not locate the Android SDK at the given path
Titanium log file output (sorry, kinda long):
!ENTRY com.appcelerator.titanium.mobile 4 0 2012-02-22 14:06:21.992
!MESSAGE (Build 1.0.0.1327639206) [ERROR] [ERROR] The system cannot find the path specified.
[ERROR] The system cannot find the path specified.
Traceback (most recent call last):
File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 45, in <module>
print get_avds(sdk)
File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 21, in get_avds
for line in run.run([sdk.get_android(),'list','target'],debug=False).split("\n"):
AttributeError: 'NoneType' object has no attribute 'split'
I have no idea what's missing. Eclipse recognizes everything just fine. ANY suggestions??
P.S.
I've noticed that when I attempt to run 'android' commands, i.e.
android
android list targets
I get what seems to be an error:
The system cannot find the path specified.
However, the commands still continue to run with no issues (I get a list of all the targets and the SDK Manager pops up). I'm not sure whether or not whatever is causing that message is also causing Titanium headaches.
I was facing the exact same issue, but now I have figured this out and it was working fine.
Basically, when I install Titanium Studio and I configure Android SDK it worked fine, but when I try to execute Project there was "javac not found" error. While resolving this issue I came across a Post where it was mentioned to include '%JAVA_HOME;%' in your Path. And when I did this the Android SDK was not longer detected by Titanium.
I removed the '%JAVA_HOME%' from Path Variable and then I include Java bin Folder Path to Path Variable and created a new variable 'JAVA_HOME' which points to root directory of Java installation. Everything works fine after doing this step.
I hope you will now get your Titanium Environment running. :-)
Thanks.
Newer version of Titanium have the Update Android SDK option in the Dashboard. Just make sure, the path is correct. Some cases like mine, there might be two Android SDK paths; one was obsolete and the other was active. So, please make sure of that path. When Titatnium is about to update the SDK software, looking in for newer versions, please select Cancel, as that wouldn't be required!
open titanium ide.
click on file-> titanium mobile project.
a window will show up with a link Set-up/Configure SDKs in the
bottom. click on this link.
now give android sdk home: c:\Androi\android-sdk (or browse to
android-sdk folder in your system)
select the default Android Sdk
click Apply
Click Ok.
You should be good to go.
Let me know if you face any problems.
I am doing Android Development using Eclipse. I have downloaded all the required software, but I am having the same problem as discussed in "Unable to set up Android Target in Eclipse". Now I do not find the solution of the problem on that discussion so let me rewrite the problem again,
When I load Eclipse and create a new Android project, it keeps on waiting for the ADT to load. To figure out what is wrong I went to preferences and tried to put the location of the ADT I created in it but it keeps giving me this error when I put the address of ADT,
Could not find folder 'tools' inside SDK 'E:\Documents and
Settings\me\android-sdks'..
How can this issue be resolved?
I created the folder tools manually, now I am getting this error:
[2011-12-24 15:23:56 - DDMS] DDMS files not found: E:\Documents and Settings\me\android-sdks\platform-tools\adb.exe E:\Documents and Settings\me\android-sdks\tools\hprof-conv.exe E:\Documents and Settings\me\android-sdks\tools\traceview.bat
[2011-12-24 15:42:06 - DDMS] DDMS files not found: E:\Documents and Settings\me\.android\platform-tools\adb.exe E:\Documents and Settings\me\.android\tools\hprof-conv.exe E:\Documents and Settings\me\.android\tools\traceview.bat
If you install Eclipse properly then:
Start Eclipse
From the menu bar, select Window > Preferences > Android
For Android location, browse the folder in which you install Android SDKs.
In Android SDKs folder, rename the folder platforms-tools to tools.
Select the folder Android SDKs through Preferences dialog box.
If I get you correctly you have just downloaded Android sdk and want to configure it working with Eclipse. I think you miss one step from the installation of the sdk:
1) you download it
2) you extract it somewhere
3) then go to the specified directory and start AndroidManager (or was it just android??). There you specify you need platform-tools and the manager will configure that for you. This will also provide you with the 'adb' executable which is crucial for the Android developement.
After that you install ADT (which I think you already did) and from Eclipse preferences -> Android options you get a place to specify where your android-sdk is. If you specify it after you did the 'step 3' you should be good to go.
I am not 100% sure I got it correctly and what your state is, so please forgive me if my comment is irrelevant. If I am wrong I will be happy to help if you provide some more details.
Something I am completely sure is that you shouldn't need to create the folder 'tools' by yourself.
PS: The description I gave is for newer versions of android sdk, but if you are encountering a problem with older version I will recommend you to start from scratch with newer version. It shouldn't take you that long time.
This can also happen due to the bad unzipping process of SDK.It Happend to me.
Dont use inbuilt windows unzip process.
use WINRAR software for unzipping sdk
By default it looks for the SDK tools in "C:\Documents and Settings\user\android-sdks". Some times we install it at another location. So you just have to select the correct path and it will done.
I faced similar issue when the SDK tools installation was failed during the initial setup. To resolution is to download SDK tools from Android Developer Site
Expand "USE AN EXISTING IDE" section and download standalone SDK tools
Choose your destination as (%HOMEPATH%\android-sdks)
Now start Android-SDKs folder and run SDK manager
If you get the "Failed to find DDMS files..." do this:
Open eclipse
Open install new software
Click "Add..." -> type in (e.g.) "Android_over_HTTP" and in address put "http://dl-ssl.google.com/android/eclipse/".
Don't be alarmed that its not https, this helps to fetch stuff over http. This trick helped me to resolve the issue on MAC, I believe that this also should work on Windows / Linux
Hope this helps !
In my case i was using Ubuntu. Where the was two directories one was /android-sdks
and /android-sdk-linux. I used the second one it works for me :)
My solution was to remove the Eclipse ADT plugin via menu "Help > About Eclipse SDK > Installation Details". Eclipse will restart.
Next go to Menu "Help > Install New Software", then add the ADT plugin url "https://dl-ssl.google.com/android/eclipse" (or select the existing link from the dropdown).
This will re-install the latest ADT, including the DDMS files.
For me it was a simple case of specifying the path to the 'sdk' subfolder rather than the top level folder.
In my case I needed to input
/Users/Myusername/Documents/adt-bundle-mac-x86_64-20140321/sdk
instead of
/Users/Myusername/Documents/adt-bundle-mac-x86_64-20140321
In trying to update my SDK to the latest, some things installed, but others* didn't.
*SDK Platform Android 4.0, API14, revision 3
Google APIs by Google Inc., Android API15 revision 1
Google APIs by Google Inc., Android API14 revision 2
Sources for Android SDK, API14, revision 1
I got this err msg:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-= Warning ! =-
A folder failed to be moved. On Windows this typically means that a program is uing that folder (for example Windows Explorer or your anti-virus software.)
Please momentarily deactivate your anti-virus software or close any running programs that may be accessing the directory 'C:\Program Files (x86)\Android\android-sdk\platforms\android-14'.
When ready, press YES to try again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Even after manually stopping a McAfee service and MS Malware service (MS Security Essentials) via
Task Manager, I still got this err msg.
The error highlighted (in brick red) in the Android SDK Manager Log is:
Failed to rename C:\Program Files (x86)\Android\android-sdk\platforms\android-14 to C:\Program Files (x86)\Android\android-sdk\temp\PlatformPackage.old01.
Is this something I should do manually - would that allow the update to take place?
If you started the update from eclipse, it might help to exit eclipse, and go to your sdk/utils directory and start de SDKmanager from there. This worked for me after I got the same message today.
I don't know if this will help but generally a few things might cause problems like:
Having a device connected or the emulator running.
Forgetting to run the Android SDK tool as Administrator.
Some errors can occur with the windows "program files (x86)" path. I tend to just move the Android folder to the root C path so the SDK would be at C:\Android
If you've covered all that then I'm not sure. It should usually just work without you having to do anything else.
That is the answer. C:\Program Files is protected against user modification.
Unfortunately, the SDK Manager does not escalate it's privileges. That would be a nice addition to the Windows version.
i've just installed eclipse and tried to run my first app, unfortunately the error below always
popped out:
Unknown option '--no-crunch' Android Asset Packaging Tool
I've done the following just like what people adviced but it DIDN'T HELP,
-After updating to ADT r14, go to Window -> SDK Manager (in Eclipse)
-Check on 'repository', uncheck "installed"
-Wait for packages to load, then select all support packages, accept all and install them
-Restart Eclipse
-Run your apps on new ADT r14, without 'crunch' errors
As a result, i keep getting prompt box asking me to momentarily keep deactivating my anti virus. because there might be a program that accessing the directory.
Can anyone please help & provide me the solution??
thank you
I had good luck updating the Android SDK tools to revision 15 and Android SDK Platform tools to revision 9. But this was a stab in the dark that worked. What I am trying to say is I don't understand the reasons for this to work. This solution is easy to try. If it works for you then vote for this answer.
There is a similar question on Stack Overflow at Google APIs throw no-crunch error for android
Other notes:
Running on Windows 7 and Eclipse Version: Indigo Service Release 1
Build id: 20110916-0149. Compiling for Android 2.2.
Also I updated my Java JDK yesterday to version 1.6.0_25, which may not be relevant but I can't think of another reason for this error to start today.
Android "no crunch" Eclipse aapt "Unknown option '--no-crunch'"
Well, this problem is mainly caused when you have ADT Plugin updated but not repositry in SDK Manager. In Eclipse, Instead of updating sdk manager from Windows -> Android SDK Manager -> Settings... It might not update and normally displays error: Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml. To avoid this, try this solution, hope it surely works:
Go to folder Android SDK where your sdk is placed(in my case"D:/Android SDK/android-sdk-Windows").
From this folder double click "SDK Manager.exe".
When Android SDK and AVD Manager window opened then click Settings.
In Proxy Settings, it will ask for a HTTP Proxy Server and HTTP Proxy Port.
Enter the IP address and the port number being asked.
In Misc Tab check "Force https://... "
Turn off your firewall and temporarily disable your antivirus.