在Android Studio中创建新项目时如何选择目标API级别? [英] How to choose target API level when creating a new project in Android Studio?

查看:1388
本文介绍了在Android Studio中创建新项目时如何选择目标API级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是android开发和Android Studio的新手。我也有一个运行Android 5.0.1版的物理设备。当我尝试从设备上的Android Studio调试应用程序时,没有得到模拟器中的行为。

I am new to android development and Android Studio. I also have a physical device which runs android version 5.0.1. When I try to debug an app from Android Studio on my device I don't get the behavior as in the emulator.

我项目的目标API级别(创建时) )始终为23(Android 6.0棉花糖)。尽管最低API级别为17(Android 4.2 Jelly Bean),但我想知道如何在项目创建时设置目标API级别。当前版本的Android Studio(1.4.1)是否可能?

My project's target API level (when I create it) is always 23 (Android 6.0 Marshmallow). Although the minimum API level is 17 (Android 4.2 Jelly Bean) I want to know how to set the target API level on project creation. Is this possible with the current version of Android Studio (1.4.1)?

推荐答案

无法选择目标API当前使用Android Studio(1.4.1)中的新建项目向导来设置级别。始终应该始终是可用的最新版本。

There is no way to choose the target API level using the New Project wizard in Android Studio currently (1.4.1). It should always be the latest version available anyway.

来自 http://developer.android.com/intl/es/training/basics/supporting-devices/platforms.html#sdk-versions


为使您的应用能够利用这些更改并确保
的应用适合每个用户设备的样式,您应该将
targetSdkVersion值设置为与可用的最新Android版本匹配。

To allow your app to take advantage of these changes and ensure that your app fits the style of each user's device, you should set the targetSdkVersion value to match the latest Android version available.

要在项目创建后对其进行修改,只需编辑您的 build.gradle 文件中的 targetSdkVersion 值。

To modify it after project creation just edit the targetSdkVersion value in your build.gradle file.

这篇关于在Android Studio中创建新项目时如何选择目标API级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆