zoukankan      html  css  js  c++  java
  • 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框架丢失的问题。

  • 相关阅读:
    TODO: Android UI测试 UIAutomator
    Android-jacoco代码覆盖率:单元测试覆盖率+功能测试覆盖率
    Android --其他测试点
    Android 测试-Robolectric,mockito,esspresso
    Android adb的一些用法
    Android上执行python脚本-QPython
    【洛谷P1080】国王游戏
    【洛谷P2123】皇后游戏
    【洛谷P2340】 奶牛会展
    【洛谷P1982】小朋友的数字
  • 原文地址:https://www.cnblogs.com/Small-Life/p/4098222.html
Copyright © 2011-2022 走看看