android 学习十 support package

support package

支持的最低版本的api版本是4.

support package 包含静态的support 库,通过将这个库添加到android application 中我们便可以使用那些不适用于旧版本的或者是那些提供的实用的但不属于框架的api。目的就是通过捆绑更多的api到application中来简化开发,同时可以使你话费更少的精力在平台的版本问题上。

note:support package 包含不止一个的support library每一个都有一个不同的支持的最低版本的api版本,例如一个库要求api版本是四或者更高,同时另一个库要求api版本是13或者更高(V13是V4的一个超集,包含了额外的支持V13api的类),最低版本通过名字来表示如V4 V13。

在google最新的sdk文档中我们能看到最新版本support package 的修订。


以下摘录自google的官方文档,告诉大家怎么下载support package 以及如何将support library 加入到自己的工程中来,英文很容易懂,就不翻译了。

Downloading the Support Package

The Support Package is provided as a downloadable package from the Android SDK and AVD Manager. To install:

  1. Launch the SDK and AVD Manager.

    From Eclipse, you can select Window > Android SDK and AVD Manager. Or, launch SDK Manager.exe from the <sdk>/ directory (on Windows only) or android from the<sdk>/tools/ directory.

  2. Expand the Android Repository, check Android Support package and click Install selected.
  3. Proceed to install the package.

When done, all files (including source code, samples, and the .jar files) are saved into the <sdk>/extras/android/support/ directory. This directory contains each of the different support libraries, such as the library for API level 4 and up and the library for API level 13 and up, each named with the respective version (such as v4/).

Setting Up a Project to Use a Library

To add one of the libraries to your Android project:

  1. In your Android project, create a directory named libs at the root of your project (next to src/res/, etc.)
  2. Locate the JAR file for the library you want to use and copy it into the libs/ directory.

    For example, the library that supports API level 4 and up is located at <sdk>/extras/android/support/v4/android-support-v4.jar.

  3. Add the JAR to your project build path.

    In Eclipse, right-click the JAR file in the Package Explorer, select Build Path > Add to Build Path. You should then see the JAR file appear in a new directory called Referenced Libraries.

Your application is now ready to use the library APIs. All the provided APIs are available in the android.support package (for example, android.support.v4).


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Simulink支持Android的包是特定于Matlab和Simulink环境的一种工具,它使开发人员能够在Android设备上进行模型设计、仿真和部署。这个支持包提供了与Android设备进行实时通信的功能,以便将模型装载到Android设备上并进行实时测试和验证。 使用Simulink支持Android的包,开发人员可以通过Matlab和Simulink环境创建和调试Android应用程序,而无需编写复杂的代码。他们可以使用模块化的Simulink模型来描述和设计应用程序的行为,并且可以直接在Matlab和Simulink中进行仿真和调试。 此外,Simulink支持Android的包还提供了与Android设备进行实时通信的功能。通过使用Wi-Fi或蓝牙连接,开发人员可以将模型部署到Android设备上,并在实际环境中进行测试和验证。他们可以监视模型在Android设备上的执行情况,并收集实时数据进行分析和优化。 Simulink支持Android的包还允许开发人员将Matlab分析、算法和控制设计与Android设备的传感器和执行器集成在一起。他们可以借助Simulink的强大功能,快速开发出高性能的Android应用程序,并通过模型自动生成可执行的代码。 总之,Simulink支持Android的包提供了一个集成开发环境,使开发人员能够在Matlab和Simulink中进行Android应用程序的设计、仿真和部署,大大简化了Android应用程序开发的过程,并加速了移动应用程序的开发和验证。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值