Can you run an old app on a new version of the android

喜夏-厌秋 提交于 2019-12-06 13:53:34

问题


Okay so this doesn't really have much to do with code help but I am just starting my final year project and will be developing preferably for Android mobile devices. The plan is to create it in Android 2.1 as I only have a used HTC hero but my testers have a mix of version androids. and not many have a new HTC One or new Nexus, so i presume that they are all using older versions of the OS.

So what I need to know is, will I be able to create the application in 2.1 and it run on new versions of the OS (preferably phones not tablets, if it matters)?


回答1:


Yes, you absolutely can! No issues with that, as far I know.

When you are building your application, in the Manifest file you declare the MinSDKVersion which specifies the minimum Android OS version needed to run your application. Your application will run on all devices which are above or exactly the minimum SDK version specified.

There is no limit on the maximum version which can run your application.




回答2:


Yes It is very easy to run your older android application to the higher android version. You must specify the MinSDKVersion must be lower than your emulator or the android device, For more detail please go through the following link. http://grabcodes.blogspot.com




回答3:


You might want to set also targetSdkVersion=7 and make sure you have the appropriate 2.1 (API 7) in your environment. If you set another value indictating that you will develop for more modern versions and 7 is only the MIN value, you may get annoying and maybe confusing indications that some calls to android api are deprecated in Eclipse. Maybe not a big problem, but could end up wasting your time if you get confused.



来源:https://stackoverflow.com/questions/12517009/can-you-run-an-old-app-on-a-new-version-of-the-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!