Eclipse and Android error 'parseSdkContent failed'

丶灬走出姿态 提交于 2019-12-09 04:46:35

问题


Having this issue since I upgraded the Android Tools to 21.1. When I start eclipse, even in a clean workspace, I get the error parseSdkContent failed and the details say:

com.android.sdklib.devices.DeviceManager.createInstance
(Ljava/lang/String;Lcom/android/utils/ILogger;)
Lcom/android/sdklib/devices/DeviceManager;

I have searched the internet and tried almost every solution but to no avail. When I go to Android preferences and try to set the path to the SDK , it says no target available. Is there anything else that I can try? I can't do any of my Android Development until it's fixed.


回答1:


Step 1. Find the folder named: .android

This folder can be located in your Windows user directory, for example in Windows 7 or 8:

C:\Users\YOUR_WINDOWS_USERNAME\.android

Step 2. Delete this folder .android

Step 3. Restart Eclipse and your problem will be solved.




回答2:



You DON'T have to delete ANYTHING


For me updating the DDMS from ADT plugin did the trick!

Before that for saving time I only updated ADT plugin, nothing else like Android DDMS, TraceView etc. so I ran into same issue, after couple of restarts and Google searches everyone was proposing different solutions. I updated my Android DDMS and restarted eclipse.

And It worked like a charm.

I didn't had to remove my workspace or update my .project file etc.




回答3:


Ok I just deleted eclipse and reinstalled. Lost all of my settings etc. but it's all I could do. Something must have gotten corrupted in the upgrade of the ADT.




回答4:


I had the same issue after installing 21.1 on a new machine. Solved it by deleting the default workspace I created during the first launch and then re-starting ADT as Administrator, recreating the workspace. After closing and re-running it as a normal user the problem disappeared.




回答5:


Re-installing the new version of ADT (which at the time is ADT-23.0.3.zip(http://developer.android.com/sdk/installing/installing-adt.html)) helped me with the same problem you are described above. This message may be a little to late but hope this can also help others.




回答6:


Uninstalling API 21 and installing API 19 worked for me.




回答7:


In Eclipse, use the Check For Updates item in the Help menu to update the Eclipse-part of your Android tools (called ADT).




回答8:


Try to go to your eclipse workspace and delete the .meta folder.




回答9:


I was recently having the same problem and i figured it out that one must install/update other necessary software related to ADT.Suppose you are updating your ADT then you must also update DDMS with it.So,best option is to install the all software/plugin pack for the version you are updating.

When you uninstall the full thing and install it again,all of these related software get installed in same version so it always solves the problem.

According to me re installing should be final solution.




回答10:


I got mine fixed by, before restarting your IDE, make your activity main layout as the current tab open, then restart your IDE. Hope it helps :)




回答11:


This did it for me.

In Eclipse go to

Project Properties -> Java Compiler and set 'Compiler Compliance Level' to 1.7




回答12:


For me I delete Android 5(API 21) installed software packages from SDK manager. I am working on API 20 ( Android 4.4w.2). It only solved my problem completely. Delete .android folder or others didnt help me out.




回答13:


Deleting ".android" is temporarily fixing the problem with me as after sometime it begins to come again ..

Here is another cause and fix that might help .. This is happening because of existence of 2 versions of SDK in the same machine but in case you have only one version (probably it is 21) just download the SDK platform for API 20 (4.4W) as there is a problem in 21's "layoutlib.jar"). start applying the following:

Close Eclipse

Navigate to your sdk folder (something like C:\adt-bundle-windows-x86_64-20140321\sdk)

Go to platforms folder -> android-21 folder -> data folder and rename layoutlib.jar (for backup only)

Copy the same file (layoutlib.jar) from your android-20 folder to this folder "android-21"

Start Eclipse




回答14:


maybe you have more than one android IDE installed, for example ,you installed android studio and adt+ eclipse all,just remove one can fix this problem



来源:https://stackoverflow.com/questions/15097701/eclipse-and-android-error-parsesdkcontent-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!