简体   繁体   English

Android更改目标SDK

[英]Android change target sdk

I developed an Android application and I did the coding 4 months back and at that time I didn't have a Google Play account. 我开发了一个Android应用程序,并在四个月前进行了编码,当时我还没有Google Play帐户。 Now I enrolled in Google Play and I would like to publish my app in the Play store. 现在,我注册了Google Play,并希望在Play商店中发布我的应用。 When I checked I saw the target SDK is 17 and I think now it is 19. 当我检查时,看到目标SDK是17,现在我认为是19。

Do I need to change it to 19 for proper working on latest phones? 我是否需要将其更改为19才能在最新手机上正常工作? Where do I need to change it? 我需要在哪里更改它?

I saw in the Android Manifest file there is one place: 我在Android Manifest文件中看到了一个地方:

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

If I am changing this line to 19, will it solve the issue? 如果我将此行更改为19,是否可以解决问题? If anyone knows, please help. 如果有人知道,请帮助。

It's not necessary to move to new version of API, your app works fine in newer versions of android, but if your want to use new SDK, you must be aware of changes that can act in your application 不必转移到新版本的API,您的应用在新版本的android上可以正常运行,但是如果您想使用新的SDK,则必须意识到可以在您的应用中起作用的更改
something like changes happen in AlarmManager 诸如AlarmManager发生的AlarmManager

Note : Beginning in API 19, the trigger time passed to this method is treated as inexact: the alarm will not be delivered before this time, but may be deferred and delivered some time later. 注意 :从API 19开始,传递给此方法的触发时间被视为不准确:警报不会在此时间之前发送,但可能会延迟并在以后的某个时间发送。 The OS will use this policy in order to "batch" alarms together across the entire system, minimizing the number of times the device needs to "wake up" and minimizing battery use. 操作系统将使用此策略,以便将警报在整个系统中“分批”在一起,从而最大程度地减少设备需要“唤醒”的次数,并最大程度地减少电池消耗。 In general, alarms scheduled in the near future will not be deferred as long as alarms scheduled far in the future. 通常,只要将来安排的警报不会延迟不久就安排的警报。

With the new batching policy, delivery ordering guarantees are not as strong as they were previously. 使用新的批处理策略,交货订购保证不像以前那样强大。 If the application sets multiple alarms, it is possible that these alarms' actual delivery ordering may not match the order of their requested delivery times. 如果应用程序设置了多个警报,则这些警报的实际交货顺序可能与他们要求的交货时间顺序不匹配。 If your application has strong ordering requirements there are other APIs that you can use to get the necessary behavior; 如果您的应用程序对订购有严格的要求,则可以使用其他API来获得必要的行为。 see setWindow(int, long, long, PendingIntent) and setExact(int, long, PendingIntent). 请参见setWindow(int,long,long,PendingIntent)和setExact(int,long,PendingIntent)。

Applications whose targetSdkVersion is before API 19 will continue to get the previous alarm behavior: all of their scheduled alarms will be treated as exact. targetSdkVersion在API 19之前的应用程序将继续获得以前的警报行为:所有计划的警报将被视为精确警报。

REFERENCE 参考

If u are using Eclipse then Right Click on you project -> Open Poroperties tab => Select Andorid =>and choose any required version as seen in image . 如果您使用的是Eclipse,则在项目上单击鼠标右键->打开Poroperties选项卡=>选择Andorid =>并选择任何所需的版本,如图所示。 附加图片

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

相关问题 如何允许用户使用Android上的Facebook SDK FeedDialogBu​​ilder更改帖子的目标受众 - How can I allow the user to change the target audience of a post with Facebook SDK FeedDialogBuilder on Android Android Studio目标导航抽屉SDK版本 - Android studio target navigation drawer sdk version 在加载SDK之前无法解析目标'android-15' - Unable to resolve target 'android-15' until the SDK is loaded android:可能 select 目标 sdk **创建新项目时**? - android: possible to select target sdk **when creating new project**? 在android sdk的searchview中更改文本字段的背景 - change background of text field in searchview of android sdk 更改Android Studio的默认SDK版本 - Change default sdk version of Android Studio Android Facebook sdk,sharedPreferences永不改变吗? - Android Facebook sdk, the sharedPreferences never change? 在sdk android的基础上改变方法的可见性 - change visibility of method on the basis of sdk android 即使安装了最新的SDK,Android Lollipop也未在Eclipse Target SDK中列出 - Android Lollipop is not listed in Eclipse Target SDK even after installing latest SDK 试图用最小于目标SDK的最小SDK编译Eclipse中的Android应用 - Struggling to compile android apps in Eclipse with a min-sdk that is smaller than the target-sdk
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM