安装分析失败清单格式错误

安装应用程序时遇到奇怪的问题。

当我编译我的项目时没有错误,但当我尝试启动它时,

安装错误:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误。

我尝试了太多与安装错误相关的事情:INSTALL_PARSE_FAILED_MANIFEST_MARMAND错误,也遵循该规则,但出现问题。

<manifest
android:hardwareAccelerated="true"
android:versionCode="1"
android:versionName="0.0.1"
package="Work.Work"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:smallScreens="true"
    android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application
    android:hardwareAccelerated="true"
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:supportsRtl="true">
    <activity
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
        android:label="@string/activity_name"
        android:launchMode="singleTop"
        android:name="MainActivity"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
        android:windowSoftInputMode="adjustResize">
        <intent-filter android:label="@string/launcher_name">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:exported="true"
        android:name="com.plugin.gcm.PushHandlerActivity" />

    <receiver
        android:name="com.plugin.gcm.CordovaGCMBroadcastReceiver"
        android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

            <category android:name="Work.Work" />
        </intent-filter>
    </receiver>
    <service android:name="com.plugin.gcm.GCMIntentService" />
    <activity
        android:exported="true"
        android:name="com.adobe.phonegap.push.PushHandlerActivity" />

    <receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler" />
    <receiver
        android:exported="true"
        android:name="com.google.android.gms.gcm.GcmReceiver"
        android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <category android:name="${applicationId}" />
        </intent-filter>
    </receiver>

    <service
        android:exported="false"
        android:name="com.adobe.phonegap.push.GCMIntentService">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        </intent-filter>
    </service>
    <service
        android:exported="false"
        android:name="com.adobe.phonegap.push.PushInstanceIDListenerService">
        <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID" />
        </intent-filter>
    </service>
    <service
        android:exported="false"
        android:name="com.adobe.phonegap.push.RegistrationIntentService" />
</application>
<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="23" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission
    android:name="Work.Work.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />
<!--<uses-permission android:name="Work.Work.permission.C2D_MESSAGE" />-->
<!--<uses-permission android:maxSdkVersion="18" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission
    android:name="${applicationId}.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />
<!--<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />-->

解决方案

我遇到此错误是因为我的包名称中有大写字母,如下所示。

Com.Droider.packagename;

在我将其更改为类似于:

com.droider.packagename;

在您的情况下,尝试将其更改为:

work.work;

编辑1:

可能也是因为这个原因。

android:name="MainActivity"

将其更改为。

android:name=".MainActivity"

相关文章