简体   繁体   中英

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. How do you get eclipse to run it on an older version to see if it works? I'm sure I can load it manually but it seems Eclipse should allow this.

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" />

The key is to specify the minSdk version too.

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. But you need to make sure the AVD is properly registered with 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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