Android Dependencies被误删除的解决办法

转自http://www.eoeandroid.com/thread-272679-1-1.html

第三方jar的导入方式

在新版本的ADT环境下,只需要在工程目录下新建libs文件夹(注意是libs不是lib),
然后将第三方的jar复制进去,eclipse会自动将这个jar添加到Android Dependencies文件夹下,
不必在通过BuildPath自己去修改了,也不需要ReferenceLibrary了。

另外,如果多个工程有关联的话,比如A工程设置为IsLibaray,B工程要引入A工程的时候,也会自动将A工程编译生成的jar放到Android Dependencies文件夹下。

1. Android Dependencies被误删除的解决办法一:
修改classpath

正常的classpath
[mw_shl_code=java,true]
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="gen"/>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
        <classpathentry kind="output" path="bin/classes"/>
</classpath>[/mw_shl_code]

其中<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>就代表了Android Dependencies,
BTW, <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>就是android的框架,即


如果被误删除了Android Dependencies, 只要把对应的classpathentry加上就可以了。

2. Android Dependencies被误删除的解决办法二:

项目 右键 ->android tools ->Fix Project

这个方法可以同时解决Android Dependencies 和 android框架丢失的问题。

原文地址:https://www.cnblogs.com/Small-Life/p/4098222.html