问题描述
我觉得我必须在这里俯瞰某些东西.我已经通过 SDK Manager 下载了 API Level 10
API.如果我尝试创建一个新项目,我不能,因为只有 Holo
主题可用,所有这些都至少需要 API 级别 11
.我没有其他主题选项,因此下一步"按钮变灰.有没有办法指定兼容的主题?
I feel like I must be overlooking something here. I have downloaded the API Level 10
API through the SDK Manager. If I try to create a new project I can't, because only Holo
themes are available, all of which require at least API Level 11
. I have no other theme option, thus the Next button is greyed out. Is there a way to specify a compatible theme?
推荐答案
如果您没有看到 None 选项,请转到这些文件并确保模板配置正确:
if you does not see the None option go to these files and make sure the template is configured correctly:
{Install_Path}\android-studio\plugins\android\lib\templates\gradle-projects\NewAndroidApplication\template.xml
{Install_Path}\plugins\android\lib\templates\gradle-projects\NewAndroidLibrary\template.xml
{Install_Path}\sdk\tools\templates\projects\NewAndroidApplication\template.xml
{Install_Path}\sdk\tools\templates\projects\NewAndroidLibrary\template.xml
在文本编辑器 (Notepad++) 中打开每个文件并搜索baseTheme".应该有一个带有该 ID 的参数"xml 元素.
open each file in text editor (Notepad++) and search for 'baseTheme'. there should be a 'parameter'xml element with that id.
确保参数看起来像这样
<parameter
id="baseTheme"
name="Base Theme"
type="enum"
default="none"
help="The base user interface theme for the library">
<option id="none" default="true">None</option>
<option id="holo_dark" minBuildApi="11">Holo Dark</option>
<option id="holo_light" minBuildApi="11">Holo Light</option>
<option id="holo_light_darkactionbar" minBuildApi="14">Holo Light with Dark Action Bar</option>
</parameter>
而不是这样:
<parameter
id="baseTheme"
name="Base Theme"
type="enum"
default="holo_light_darkactionbar"
help="The base user interface theme for the application">
<option id="holo_dark" minBuildApi="11">Holo Dark</option>
<option id="holo_light" minBuildApi="11">Holo Light</option>
<option id="holo_light_darkactionbar" minBuildApi="14" default="true">Holo Light with Dark Action Bar</option>
</parameter>
特别是文件'\android-studio\plugins\android\lib\templates\gradle-projects\NewAndroidApplication\template.xml'
especially for the file '\android-studio\plugins\android\lib\templates\gradle-projects\NewAndroidApplication\template.xml'
这篇关于无法使用 API 级别 10 创建 Android 项目,因为没有可用的兼容主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!