简体   繁体   English

所选活动模板的最低 SDK 级别为 9

[英]Selected activity template has a minimum SDK level of 9

I can't create a new window on Android Studio.我无法在 Android Studio 上创建新的 window。 Error message shown in red "Selected activity template has a minimum SDK level of 9" how can I solve this issue?以红色显示的错误消息“所选活动模板的最小 SDK 级别为 9” 我该如何解决这个问题?

在此处输入图像描述

Chose an higher minimum API level (at least 14 for this template).选择更高的最低 API 级别(此模板至少为 14)。 Go back to the first step and change the minimum api level.回到第一步,更改最小api级别。

Selected Activity template has a minimum SDK level of X所选活动模板的最低 SDK 级别为 X

Android Studio says so, because you've selected Minimum SDK version to be less than X. in you case SDK version less than 9 in the previous option. Android Studio是这样说的,因为您在上一个选项中选择了最小 SDK 版本小于 X。在这种情况下,SDK 版本小于 9。

See this:看到这个:

在此处输入图片说明

I'd get the same error as yours, as I've set Minimum SDK to be : Android 1.1 .我会得到和你一样的错误,因为我已经将最小 SDK 设置为: Android 1.1

FIX:-使固定:-

Choose an SDK version higher than 9.选择高于 9 的 SDK 版本。

In your case, it's ideal to choose API 16: Android 4.1(Jelly Bean) and above as more features would be supported from this version onwards.在您的情况下,最好选择API 16: Android 4.1(Jelly Bean)及更高版本,因为此版本以后将支持更多功能。

You have to open build.gradle and change the minSdkVersion to 16. Then, you have to rebulid the project.您必须打开 build.gradle 并将 minSdkVersion 更改为 16。然后,您必须重新构建项目。 I fix that issue by this way我通过这种方式解决了这个问题

Go to app level gradle file. Go 到应用级 gradle 文件。 You can find it from the gradle scripts -> build.gradle(Module:app).您可以从 gradle 脚本 -> build.gradle(Module:app) 中找到它。 In android{defaultConfig{minSdkVersion}}} put 16 and Sync project from top right.在 android{defaultConfig{minSdkVersion}}} 中,从右上角放置 16 和 Sync 项目。 This should solve your problem.这应该可以解决您的问题。 This happens because the API Level expressed by an application will be compared to the API Level of a given Android system, which may vary among different Android devices.发生这种情况是因为应用程序表示的 API 级别将与给定 Android 系统的 API 级别进行比较,这可能因不同的 Android 设备而异。 You can find more details here https://developer.android.com/guide/topics/manifest/uses-sdk-element您可以在此处找到更多详细信息https://developer.android.com/guide/topics/manifest/uses-sdk-element

暂无
暂无

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

相关问题 对Activity的最低SDK版本支持 - Minimum SDK version support for Activity 最低sdk是否过低(如8 sdk)有什么影响,目标sdk越过sdk(如23 sdk)? - There is any impact of minimum sdk is too lower level (as 8 sdk level) and target sdk is higher sdk level (as 23 sdk level) ? Android Studio V0.8无法创建新的Glass Module,错误为“组件Glass Module的最低SDK级别为19” - Android studio V0.8 cannot create new Glass Module with error “The component Glass Module has a minimum SDK level of 19” setDisplayHomeAsUpEnabled要求最低SDK必须为11 - setDisplayHomeAsUpEnabled Requires minimum SDK has to be 11 在开发Android应用程序时选择最低的SDK和API级别 - Choosing minimum SDK and API level while developing an android application 所选活动模板需要现有的应用程序主题 - Selected activity template requires an existing Application Theme 主/细节流的最小api级别等于使用中的api级别 - Master/Detail flow has minimum api level equal to that in use Android Studio:列出需要SDK级别高于项目最低级别的所有调用 - Android Studio: List all calls which requires SDK level above the project minimum level 如何在sdk最低为9的android项目中使用google exo player? - How to use google exo player in android project that has a minimum sdk of 9? Android-当最小SDK为16时,对活动B中的活动A的视图进行动画处理 - Android - Animate views from Activity A in Activity B when minimum SDK is 16
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM