gpt4 book ai didi

java - Android 目标 API - 无法创建带有 Activity 的项目

转载 作者:行者123 更新时间:2023-12-02 06:02:09 28 4
gpt4 key购买 nike

我在创建项目时遇到问题。

当我想创建一个具有空白 Activity 的简单项目时,我无法继续执行这些步骤,并且收到以下消息:

This template requires a build target API version of at least 14, and the current is 7

最佳答案

大多数模板使用 ActionBar 或 Fragments 等功能。

如果您想从向后兼容的模板创建应用程序。

以下是使用向导创建兼容模板的方法:

  1. Right click your package explorer > New > Android Application
  2. Enter your details, and make sure to select "none" as theme
  3. Pick the highest possible Minimum SDK that fits your needs
  4. When you arrive at the "Create Activity" Screen, select "Blank Activity"
  5. Finish.

如果您想要开始使用更多功能,您还可以从 SDK 中选择一个示例(例如 ActionBarCompat)并将其用作您的应用的模板。

关于java - Android 目标 API - 无法创建带有 Activity 的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22590256/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com