【问题标题】:Android, referencing other librariesAndroid,引用其他库
【发布时间】:2014-06-04 21:49:52
【问题描述】:

有没有办法,如何将自定义库添加到 android 应用程序。如果我将非 android 库添加到我的项目中,则会抛出错误“只有 Android 项目可以添加为依赖项”,如果我将 Android 库引用到 Java 应用程序,则会抛出“无法添加此项目,因为它不会使用蚂蚁脚本。”关键是,我想将代码保存在一个地方(库)并重用它。

【问题讨论】:

    标签: java android ant dependencies libraries


    【解决方案1】:

    你最好的选择是:

    1.Create a folder called libs in your project's root folder
    2.Copy your JAR files to the libs folder
    3.Now right click on the Jar file and then select Build Path > Add to Build Path, which will create a folder called 'Referenced Libraries' within your project
    

    【讨论】:

      猜你喜欢
      • 2021-10-23
      • 2016-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-18
      • 1970-01-01
      • 2013-05-02
      • 2020-01-15
      相关资源
      最近更新 更多