简体   繁体   English

在较旧的API AVD上运行Android应用程序

[英]Run android app on older API AVD

I want to support newer themes using values-11, values-14, etc. For the application to compile, I have to increase the target API, but that removes the lower API AVDs from the selection list in the run configuration. 我想使用值-11,值-14等支持更新的主题。对于要编译的应用程序,我必须增加目标API,但这会从运行配置中的选择列表中删除较低的API AVD。 How do you get eclipse to run it on an older version to see if it works? 你如何让eclipse在旧版本上运行它以查看它是否有效? I'm sure I can load it manually but it seems Eclipse should allow this. 我确定我可以手动加载它,但似乎Eclipse应该允许这样做。

You can specify which API level to target, but also the minimum that will run the app, in <uses-sdk android:minSdkVersion="X" android:targetSdkVersion="Y" /> 您可以在<uses-sdk android:minSdkVersion="X" android:targetSdkVersion="Y" />指定要定位的API级别,以及运行应用程序的最小级别。

The key is to specify the minSdk version too. 关键是要指定minSdk版本。

I think Eclipse will try to launch an AVD that satisfies your targetApiLevel , but if any AVD is running at or above your minSdkLevel , then it will use that instead. 我认为Eclipse会尝试启动一个满足你的targetApiLevel的AVD,但如果任何AVD运行在你的minSdkLevel或以上,那么它将使用它。 But you need to make sure the AVD is properly registered with Eclipse. 但是你需要确保AVD在Eclipse中正确注册。 In my experience, this usually would seem to mean not closing the AVD Manager window until the AVD is fully booted and showing the Home screen (or your app). 根据我的经验,这通常似乎意味着在AVD完全启动并显示主屏幕(或您的应用程序)之前不关闭AVD管理器窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM