如何更改 Android 项目上的目标构建? [英] How to change target build on Android project?

查看:20
本文介绍了如何更改 Android 项目上的目标构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在 Eclipse 中有一个 Android 项目.

I currently have an Android project in Eclipse.

我使用 1.5 (sdk 3) 的目标版本创建了它.

I created it with a target build of 1.5 (sdk 3).

现在我想更改它,使其 minSdk 为 3,targetSdk 为 8.

Now I want to change it so that it has a minSdk of 3 and targetSdk of 8.

要做到这一点,我发现我必须针对最新的 SDK (2.2) 进行构建

To do this I see that I must build against the newest SDK (2.2)

要在 Eclipse 中执行此操作,我右键单击我的项目,转到属性,单击 Android 并将项目构建目标更改为 Android 2.2,然后单击应用然后确定.

To do this in Eclipse I right click on my project, go to properties, click on Android and change the project build target to Android 2.2 and click apply and then ok.

然而,这似乎没有影响,当我再次尝试时,目标版本被设置回 Android 1.5.

However this appears to have no affect and when I try it again the target build is set back at Android 1.5.

我是否遗漏了一步或什么?

Am I missing a step or something?

推荐答案

右键单击项目并单击属性".然后从左侧的树中选择Android".然后您可以在右侧选择目标版本.

Right click the project and click "Properties". Then select "Android" from the tree on the left. You can then select the target version on the right.

(请注意下面的流行评论,请确保您的属性、类路径和项目文件是可写的,否则将无法运行)

(Note as per the popular comment below, make sure your properties, classpath and project files are writable otherwise it won't work)

这篇关于如何更改 Android 项目上的目标构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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