如何在eclipse项目中添加外部依赖项? [英] How to add an external dependency to an eclipse project?

查看:80
本文介绍了如何在eclipse项目中添加外部依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我熟悉从

项目>构建路径>添加外部档案文件

Project > Build path > Add external archives

但是我不知道如何导入像这样的依赖项(从Google Firebase获取示例):

But I dont know how to import dependencies like this (sample from google firebase):

dependencies {
     compile 'com.google.firebase:firebase-messaging:11.6.0'
}

此示例指令导致生成JAR文件还是什么?我应该如何将这样的依赖项导入到android项目中?

Is this example instruction leads to a JAR file or what? How should I import dependencies like this to an android project?

推荐答案

将android库项目作为模块导入当前应用中.而不是像这样在 build.gradle(module:app)文件中添加项目名称-> compile project(':lib'),假设导入的项目名称是lib.

Import android library project as module in your current app. than add the project name in build.gradle(module:app) file like this-> compile project(':lib') suppose the importing project name is lib.

这篇关于如何在eclipse项目中添加外部依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆