我觉得我一定是忽略了这里的某些东西。我已经下载了API Level 10
通过 SDK 管理器的 API。如果我尝试创建一个新项目,我不能,因为只有Holo
主题可用,所有主题至少需要API Level 11
。我没有其他主题选项,因此“下一步”按钮呈灰色。有没有办法指定兼容的主题?
如果您没有看到“无”选项,请转到这些文件并确保模板配置正确:
{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 的“parameter”xml 元素。
确保参数看起来像这样
<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'
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)