错误:(30)标记<category>属性名称包含无效字符&#39; &#39;

时间:2015-12-16 08:52:31

标签: android debugging android-studio android-manifest

我的应用程序运行成功,但突然我在调试/清单文件中出错 错误:(30)标签属性名称包含无效字符&#39; &#39 ;. 错误:任务&#39;:app:processDebugResources&#39;执行失败。

  

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程&#39;命令&#39; C:\ Users \ Administrator \ AppData \ Local \ Android \ sdk \构建工具\ 22.0.1 \ aapt.exe&#39;&#39;完成非零退出值1

这是我的调试/清单文件

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />

<application android:allowBackup="true" android:icon="@drawable/icon_48"
    android:label="@string/app_name" android:theme="@style/MyMaterialTheme.Base">
    <activity android:name="com.solution.caring.caringsolutions.Splash"
        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>
    </activity>
    <activity android:name="com.solution.caring.caringsolutions.MainActivity"
        android:label="@string/title_activity_splash" android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.LoginActivity"
        android:label="@string/title_activity_login" android:screenOrientation="portrait"
        android:windowSoftInputMode="stateVisible|adjustPan" />
    <activity android:name="com.solution.caring.caringsolutions.SignUpActivity"
        android:label="@string/title_activity_sign_up" android:screenOrientation="portrait"
        android:windowSoftInputMode="stateVisible|adjustPan" />
    <activity android:name="com.solution.caring.caringsolutions.ContactUs"
        android:label="@string/title_activity_contact_us" android:screenOrientation="portrait"
        android:theme="@style/MyMaterialTheme1.Base"
        android:windowSoftInputMode="stateVisible|adjustPan" />
    <activity android:name="com.solution.caring.caringsolutions.CareGiver"
        android:label="@string/title_activity_members_list" android:screenOrientation="portrait"
        android:windowSoftInputMode="stateVisible|adjustPan" />
    <activity android:name="com.solution.caring.caringsolutions.Testimonials"
        android:label="@string/title_activity_testimonials"
        android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.AskAssistant"
        android:label="@string/title_activity_ask_assistant"
        android:screenOrientation="portrait" android:theme="@style/MyMaterialTheme1.Base"
        android:windowSoftInputMode="stateVisible|adjustPan" />
    <activity android:name="com.solution.caring.caringsolutions.Newsroom"
        android:label="@string/title_activity_newsroom" android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.Resources"
        android:label="@string/title_activity_resources" android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.HomeCare"
        android:label="@string/title_activity_home_care" android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.Dash"
        android:label="@string/title_activity_new_dash" android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.CardActivity"
        android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.NewDash"
        android:screenOrientation="portrait" />
    <activity android:name="com.solution.caring.caringsolutions.NewCard"
        android:screenOrientation="portrait" />
</application>

任何帮助都会受到欢迎

2 个答案:

答案 0 :(得分:1)

礼貌转到 @Gaskoin

import module删除额外的空间。这就是问题的原因。

category

然后清除 - 重建 - 使缓存无效/重新启动

答案 1 :(得分:1)

我遇到了同样的问题,我在应用程序ID中发现了我的错误,其中包名称不正确,在构建期间,调试/清单和发布/清单只会从那里获取包名称,无论如何。

我的解决方案是:文件 - &gt;项目结构 - &gt;在模块中,app - &gt; Flavors - &gt; applicationId,我更正了applicationId,它运行得很好。