Android的加入外部库项目 [英] Android adding external libraries to project

查看:179
本文介绍了Android的加入外部库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我想外部库添加到(并让它们与应用程序打包在一起),但我不知道它发生的项目。我读此链接:

I have a project that I would like to add external libraries to (and have them packaged with the application) but I am not sure it is happening. I read on this link:

http://developer.android.com/intl/ FR /引导/附件/问题/ commontasks.html

如何,但它们不以任何的/数据/数据​​/项目目录的显示。有谁知道我可以证实,库实际上是添加到项目在运行时使用?谢谢你。

how to, but they do not show up in any of the /data/data/project directories. Does anyone know how I can confirm that the libraries were in fact added to the project for use at runtime? Thanks.

推荐答案

如果您包括您的项目的Java构建路径下的罐子作为外部JAR,那么类将被转换成Dalvik的格式,并在项目的classes.dex予以提供文件打包到.apk文件。

If you include jars as External Jars under your project's Java Build Path, then the classes will be converted to Dalvik format and be made available in your project's classes.dex file, packaged into the .apk.

要确认他们是可用,尝试使用一些从罐子(Eclipse应当建议有关进口当你第一次提供一个类名)构建并运行应用程序,看看是否可行?如果它工作在发展中(例如在Eclipse中跑),那么它也将工作时,应用程序是内置的发布和分发作为一个APK。

To confirm they are available, attempt to use something from the jar (Eclipse should suggest the relevant import when you first supply a class name) build and run the app and see if it works? If it works in development (e.g. from 'run' in Eclipse) then it will also work when the app is built in release and distributed as an APK.

这篇关于Android的加入外部库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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