无法与API级别10创建Android项目,因为没有兼容的主题可用 [英] Can't create Android project with API Level 10 because no compatible themes are available

查看:217
本文介绍了无法与API级别10创建Android项目,因为没有兼容的主题可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得我必须在这里忽视的东西。我已经下载了 API等级10 API通过SDK管理器。如果我尝试创建一个新的项目,我不能,因为只有河洛主题可供选择,所有这些都需要至少 API级别11 。我没有其他选择的主题,因此,下一步按钮是灰色的。有没有一种方法来指定一个兼容的主题?

解决方案

如果你没有看到无选项去这些文件,并确保该模板配置是否正确:

<$p$p><$c$c>{Install_Path}\android-studio\plugins\android\lib\templates\gradle-projects\NewAndroidApplication\template.xml {INSTALL_PATH} \插件\机器人\ lib目录\模板\摇篮,项目\ NewAndroidLibrary \ Template.xml中 {INSTALL_PATH} \ SDK \工具\模板\项目\ NewAndroidApplication \ Template.xml中 {INSTALL_PATH} \ SDK \工具\模板\项目\ NewAndroidLibrary \ Template.xml中

打开文本编辑器(记事本+ +),每个文件,然后搜索baseTheme。 应与该ID的parameter'xml元素。

请务必参数看起来像这样

 &LT;参数
    的id =baseTheme
    NAME =基本主题
    TYPE =枚举
    默认为无
    帮助=基本用户界面主题库&GT;
    &LT;选择ID =无默认为真&GT;无&LT; /选项&GT;
    &LT;选择ID =holo_darkminBuildApi =11&GT;全息暗&LT; /选项&GT;
    &LT;选择ID =holo_lightminBuildApi =11&GT;全息光&LT; /选项&GT;
    &LT;选择ID =holo_light_darkactionbarminBuildApi =14&GT;全息光与暗操作栏&LT; /选项&GT;
&LT; /参数&GT;
 

和不喜欢这样的:

 &LT;参数
        的id =baseTheme
        NAME =基本主题
        TYPE =枚举
        默认值为holo_light_darkactionbar
        帮助=基本用户界面主题为应用程序&GT;
        &LT;选择ID =holo_darkminBuildApi =11&GT;全息暗&LT; /选项&GT;
        &LT;选择ID =holo_lightminBuildApi =11&GT;全息光&LT; /选项&GT;
        &LT;选择ID =holo_light_darkactionbarminBuildApi =14默认为真&GT;全息光与暗操作栏&LT; /选项&GT;
    &LT; /参数&GT;
 

尤其是对文件'\android-studio\plugins\android\lib\templates\gradle-projects\NewAndroidApplication\template.xml'

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?

解决方案

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

open each file in text editor (Notepad++) and search for 'baseTheme'. there should be a 'parameter'xml element with that id.

Be sure the parameter looks like this

<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>

and not like this:

   <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>

especially for the file '\android-studio\plugins\android\lib\templates\gradle-projects\NewAndroidApplication\template.xml'

这篇关于无法与API级别10创建Android项目,因为没有兼容的主题可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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