3

我正在关注http://developer.android.com/training/basics/activity-lifecycle/stopping.html。我从这里下载了演示活动生命周期。当我按运行-> Android-应用程序时,它显示没有找到兼容的目标。我从 SDK snd avd manager 下载了 Android4.2 和 Android 2.2。我使用 android4.2 和 android2.2 创建了四个 AVD,但它显示没有找到兼容的设备。谁能告诉我哪个设备与 Activity-lifecycle 兼容。

带着敬意

杰伊

4

6 回答 6

5

如果您已经创建了特定的 AVD,请按照以下步骤操作

Right click on your android project->Run Configuration-> in target tab select-> always prompt to pick device

然后运行你的项目,它会显示所有在线和离线 AVD,所以现在从这个列表中选择 AVD。它将启动该 AVD 并运行您的应用程序。

更新

“仍然没有与目标 'Google API' 兼容的 AVD:中止启动”

您是否通过将目标设置为创建了这些 AVD Google-API?如果没有,则编辑您的 AVD 并将目标设置为Google-Api并再次运行

于 2013-01-02T06:33:53.597 回答
0

创建支持 android-17 (Android 4.2)或 android-8 (Android-2.2)的AVD

如何创建新的 AVD ?

on Eclipse, [Window> Android AVD Manager] select,

you press the [new] button, you can create new Android Virtual Device 
于 2013-01-02T05:48:14.860 回答
0

确保根据应用的目标创建了兼容的 AVD。
* AVD 和针对您的特定应用提到的目标应该匹配。

如果尚未创建 AVD,请执行以下步骤:

on Eclipse, [Window> Android AVD Manager] select NEW,  
(press the [new] button), you can create new Android Virtual Device    

或者最简单的方法是重新安装具有内置 Android SDK 的 Eclipse。http://developer.android.com/sdk/index.html

于 2013-01-02T05:53:21.723 回答
0

我遇到了同样的问题。我创建了新的数据定义(即 Eclipse---->Window--->AVD Manager--->Data Definitions)。添加与您在创建应用程序时选择作为目标的 android 版本相对应的数据定义。

于 2013-01-02T05:58:35.857 回答
0

我的解决方案:我对使用 Google API 的项目有同样的问题,在 AVD 管理器中我创建了一个新的,并将目标更改为 Google Api 16 并且它可以工作

于 2013-04-08T17:14:10.793 回答
0

我有同样的问题。我的解决方案是简单地重新安装 SDK。

于 2013-05-24T22:09:33.123 回答