导入项目为无法解析目标的机器人,7' [英] Importing project gave Unable to resolve target 'android-7'

查看:130
本文介绍了导入项目为无法解析目标的机器人,7'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此应用程序,我在一年前左右完成(!),但从来没有推出它的市场。我试图打开它在Eclipse中我们做一些小的修改,并在codeA点点工作。所以,我进口,然后发现了这个奇怪的无法解决的目标的错误。它突出了每一个类的红色在我所有的SRC文件。

This app I completed around a year ago (!) but never launched it on the market place. I am trying to open it up in eclipse now to make some small modifications and work on the code a little bit. So I imported it and then found this weird "unable to resolve target" error. It's highlighting every class red in all my 'src' files.

我已经看了其中据说添加一行到default.properties文件类似的问题。我的项目有一个project.properties文件,其中有一行:

I've looked at a similar question which said to add the line to default.properties file. My project has a project.properties file which has the line:

target=android-7

任何意见如何得到这个工作?我总是可以启动一个新项目,只是复制所有的SRC文件,但将是pretty的跛脚和浪费时间的。

Any advice how to get this to work? I could always start a new project and just copy all the src files but that would be pretty lame and time-wasting.

还有一个注释 - 我正在开发一个新的计算机上,我不认为我有API级别7莫非是问题吗?我已经到窗口 - > Android的SDK管理器,最大可用的API它显示为8级,但7级,将意味着我可以针对更多的设备我想是这样,我想一起去了

One more comment - I'm developing on a new computer and I don't think I have the API level 7. Could that be the problem? I've gone into Window --> Android SDK Manager and the oldest available API it shows is level 8. But level 7 will mean I can target more devices I think so I'd like to go with that.

感谢您的任何帮助。

推荐答案

嗯,是的,这是你的问题。您没有API级别7下载。您可以右键单击项目,去属性 - > Android和选择其他可用的API。只要你不改变最小SDK版本在你的清单,你依然瞄准尽可能多的设备和以前一样。

Well, yes that is your problem. You don't have the API level 7 downloaded. You can right click the project and go properties->android and select another available API. As long as you don't change the min sdk version in your manifest you are still targeting as many devices as before.

<uses-sdk android:minSdkVersion="7"/>

更新

您不必这样做,但你可以在 SDK档案页旧的API

You don't have to do this, but you can get the older APIs on the SDK Archives page

我不知道是否有下一个语句中的任何官方消息,但是这是我发现在工作。如果任何人都可以有一个更好的答案填写此我想AP preciate非常喜欢。

I don't know if there is any official source for the next statement but that is what I found while working. If anybody can complete this with a better answer I would appreciate it very much.

您可以只要编译code与较新的SDK版本,你不使用任何code不兼容的previous的。

You can compile the code with a newer SDK version as long as you don't use any code not compatible to the previous ones.

例如:

我想我的应用程序可用于API 7级。但我只安装了空气污染指数15。只要我保持的minSdkVersion =7在我的清单,并且不使用任何在previous的API没有可用资源的应用程序将工作得很好我的目标设备。

I want my app to be available for API level 7. But i only have API level 15 installed. As long as I keep the minSdkVersion="7" in my Manifest and don't use any resource not available in the previous APIs the app will work just fine on my targeted devices.

这篇关于导入项目为无法解析目标的机器人,7'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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