机器人;属性&QUOT值:名称"空"具有元素类型和相关QUOT;不能包含'<'字符 [英] The value of attribute "android:name" associated with an element type "null" must not contain the '<' character

查看:191
本文介绍了机器人;属性&QUOT值:名称"空"具有元素类型和相关QUOT;不能包含'<'字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里至尊新手绑算出这个错误了。


  

属性值机器人:名与元素类型​​相关联的空不能包含'<'字符


这是一些我与另外我还包括一个图书馆我相信android.hardware.usb.jar的创造产生的。我不能确定是什么/它的目标是空

 <?XML版本=1.0编码=UTF-8&GT?;
<清单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
包=com.nitro
安卓版code =1
机器人:=的versionName1.0><用途-SDK
    安卓的minSdkVersion =12
    机器人:targetSdkVersion =18/>    <用途特征
        机器人:名字=android.hardware.usb /><应用
        机器人:allowBackup =机器人:假
        机器人:图标=@绘制/ ic_launcher
        机器人:标签=@字符串/ APP_NAME
        机器人:主题=@风格/ AppTheme
        <使用库机器人:名字=机器人:android.hardware.usb/>
        < Android的需要=机器人:真正的/>
        <活动机器人:名字=com.nitro.MainActivity
            机器人:标签=@字符串/ APP_NAME
            机器人:screenOrientation =画像            <意图过滤器
                <作用机器人:名字=android.intent.action.MAIN/>
                <类机器人:名字=android.intent.category.LAUNCHER />
            &所述; /意图滤光器>            <意图过滤器
                <作用机器人:名字=机器人:android.hardware.usb.action.USB_DEVICE_ATTACHED/>
            &所述; /意图滤光器>           <元数据机器人:名字=android.hardware.usb.action.USB_DEVICE_ATTACHED
                      机器人:资源=@ XML / acccessory_filter/>        < /活性GT;    < /用途>< /清单>

我仍然在建设和学习。这仅仅是在这一点上爱好这样下去容易对我来说,这都是我的安乐窝,而我需要详细的解释。

谢谢
凯尔


解决方案

 <使用特征
        机器人:名字=android.hardware.usb />

您还没有关闭的报价,它应该是:

 <使用特征
        机器人:名字=android.hardware.usb/>

您也忘了关闭这句话:

 <类机器人:名字=android.intent.category.LAUNCHER />

 <类机器人:名字=android.intent.category.LAUNCHER/>

另外,你的应用标签未关闭的android:假是无效的:

 <应用
        机器人:allowBackup =机器人:假
        机器人:图标=@绘制/ ic_launcher
        机器人:标签=@字符串/ APP_NAME
        机器人:主题=@风格/ AppTheme

 <应用
        机器人:allowBackup =假
        机器人:图标=@绘制/ ic_launcher
        机器人:标签=@字符串/ APP_NAME
        机器人:主题=@风格/ AppTheme>

这是不正确的:

 <使用库机器人:名字=机器人:android.hardware.usb/>
    < Android的需要=机器人:真正的/>

由于没有独立的 Android的要求标签,这也许是安卓的的<$所需C $ C>使用库标记。 这里你可以阅读更多的是。它应该是这样的:

 &LT;使用库机器人:名字=机器人:android.hardware.usb机器人:所需=真/&GT;

意图过滤器标签未关闭:

 &LT;意图过滤器

它应该是:

 &LT;意向滤光器&gt;


所有修复的bug整体表现应该是这样的,我相信:

 &LT;?XML版本=1.0编码=UTF-8&GT?;
&LT;清单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    包=com.nitro
    安卓版code =1
    机器人:=的versionName1.0&GT;    &LT;用途-SDK
        安卓的minSdkVersion =12
        机器人:targetSdkVersion =18/&GT;    &LT;使用特征的android:NAME =android.hardware.usb/&GT;    &lt;应用
        机器人:allowBackup =假
        机器人:图标=@绘制/ ic_launcher
        机器人:标签=@字符串/ APP_NAME
        机器人:主题=@风格/ AppTheme&GT;
        &LT;使用库
            安卓:名称=机器人:android.hardware.usb
            机器人:要求=真/&GT;        &LT;活动
            机器人:名字=com.nitro.MainActivity
            机器人:标签=@字符串/ APP_NAME
            机器人:screenOrientation =肖像&GT;
            &所述;意图滤光器&gt;
                &lt;作用机器人:名字=android.intent.action.MAIN/&GT;                &LT;类机器人:名字=android.intent.category.LAUNCHER/&GT;
            &所述; /意图滤光器&gt;
            &所述;意图滤光器&gt;
                &lt;作用机器人:名字=机器人:android.hardware.usb.action.USB_DEVICE_ATTACHED/&GT;
            &所述; /意图滤光器&gt;            &所述;元数据
                机器人:名字=android.hardware.usb.action.USB_DEVICE_ATTACHED
                机器人:资源=@ XML / acccessory_filter/&GT;
        &LT; /活性GT;
    &LT; /用途&gt;&LT; /清单&GT;

Extreme novice here tying to figure this error out.

The value of attribute "android:name" associated with an element type "null" must not contain the '<' character

This is generated by something I have created with the addition of the android.hardware.usb.jar I have included as a library I believe. I can't identify what/which target is "null"

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nitro"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="12"
    android:targetSdkVersion="18" />

    <uses-feature
        android:name="android.hardware.usb/>

<application
        android:allowBackup="android:false" 
        android:icon="@drawable/ic_launcher"                    
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        <uses-library android:name="android:android.hardware.usb" />
        <android-required ="android:true " />
        <activity android:name="com.nitro.MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" 

            <intent-filter
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER />
            </intent-filter>

            <intent-filter
                <action         android:name="android:android.hardware.usb.action.USB_DEVICE_ATTACHED " />
            </intent-filter>

           <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" 
                      android:resource="@xml/acccessory_filter" />

        </activity>

    </application>

</manifest>

I am still building and learning. This is just a hobby at this point so go easy on me, this is all out of my comfort zone and I will need detailed explanation.

Thanks Kyle

解决方案

  <uses-feature
        android:name="android.hardware.usb/>

You haven't closed the quote, it should be:

<uses-feature
        android:name="android.hardware.usb" />

You have also forgotten to close this quote:

<category android:name="android.intent.category.LAUNCHER />

Should be

<category android:name="android.intent.category.LAUNCHER" />

Also, your application tag is not closed and android:false is not valid:

<application
        android:allowBackup="android:false" 
        android:icon="@drawable/ic_launcher"                    
        android:label="@string/app_name"
        android:theme="@style/AppTheme"

Should be

<application
        android:allowBackup="false" 
        android:icon="@drawable/ic_launcher"                    
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

That is not correct:

    <uses-library android:name="android:android.hardware.usb" />
    <android-required ="android:true " />

As there is no standalone android-required tag, that is probably the android:required of the uses-library tag. Here you can read more on that. It should be like:

<uses-library android:name="android:android.hardware.usb" android:required ="true" />

Your intent-filter tag is not closed:

<intent-filter

It should be:

<intent-filter>


The whole manifest with all fixed bugs should be like this I believe:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.nitro"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="12"
        android:targetSdkVersion="18" />

    <uses-feature android:name="android.hardware.usb" />

    <application
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <uses-library
            android:name="android:android.hardware.usb"
            android:required="true" />

        <activity
            android:name="com.nitro.MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android:android.hardware.usb.action.USB_DEVICE_ATTACHED " />
            </intent-filter>

            <meta-data
                android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
                android:resource="@xml/acccessory_filter" />
        </activity>
    </application>

</manifest>

这篇关于机器人;属性&QUOT值:名称&QUOT;空&QUOT;具有元素类型和相关QUOT;不能包含'&LT;'字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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