解析清单时签名的apk解析错误 [英] signed apk Parse error when parsing manifest

查看:32
本文介绍了解析清单时签名的apk解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试安装已签名的 apk 时,出现解析错误(请参阅 logcat).当我安装使用默认调试密钥签名的 apk 时,一切正常.

When I try to install my signed apk I get a parse error (see logcat). When I install the apk signed with default debug key everything is okay.

这是 logcat 输出:

this is the logcat output:

08-28 17:12:47.267  23828-23828/com.android.packageinstaller W/PackageInstaller: Parse error when parsing manifest. Discontinuing installation
08-28 17:12:47.267  23828-23828/com.android.packageinstaller W/PackageParser: Skipping dir: /mnt/shell/emulated/0/vertretungsplan-2.0.0.apk
08-28 17:12:47.287  23828-23828/com.android.packageinstaller D/dalvikvm: GC_FOR_ALLOC freed 1414K, 62% free 4110K/10772K, paused 16ms, total 16ms
08-28 17:12:47.287  23828-23828/com.android.packageinstaller I/dalvikvm-heap: Grow heap (frag case) to 5.708MB for 1127536-byte allocation

正如它所说的解析清单时解析错误这是我的清单:

as it says Parse error when parsing manifest here is my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="de.MayerhoferSimon.Vertretungsplan"
          android:versionCode="6"
          android:versionName="2.0.0">

    <uses-sdk
            android:minSdkVersion="8"
            android:targetSdkVersion="11"/>

    <uses-permission android:name="android.permission.INTERNET"/>

    <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/Theme.Sherlock.Light.DarkActionBar">
        <activity
                android:name="de.MayerhoferSimon.Vertretungsplan.MainActivity"
                android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>

        <activity
                android:name="de.MayerhoferSimon.Vertretungsplan.LoginActivity"
                android:label="@string/app_name"
                android:noHistory="true"
                android:excludeFromRecents="true"
                android:screenOrientation="portrait"/>


        <!-- Settings -->
        <activity
                android:name=".Preference.Preferences"
                android:label="@string/menu_settings"
                android:parentActivityName=".MainActivity" >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                    android:name="android.support.PARENT_ACTIVITY"
                    android:value=".MainActivity" />

        </activity>

        <activity
                android:name="de.MayerhoferSimon.Vertretungsplan.Preference.KlassenListPreferenceActivity"
                android:label="@string/activity_klassenList"
                android:parentActivityName=".Preference.Preferences" >
            <!-- Parent activity meta-data to support 4.0 and lower -->
            <meta-data
                    android:name="android.support.PARENT_ACTIVITY"
                    android:value=".Preference.Preferences" />

            <intent-filter>
                <action android:name="de.MayerhoferSimon.Vertretungsplan.Preference.KLASSENLIST"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>

        <service android:name=".RefreshService"/>
    </application>
</manifest>

我看不出有什么我应该改变的...我的设备运行 4.3即使我将目标 sdk 版本更改为 18,也会出现错误.

I see no things there which I should change... My device runs 4.3 even when I change the target sdk version to 18 the error appears.

我使用 android studio 来构建和签署我的 apk.

I use android studio to build and sign my apk.

有没有办法解决这个问题?

Is there a way to fix this?

推荐答案

我发现了问题.

这个错误只是因为我是从 cyanogenmod 文件管理器安装的.

the error only appeared because I installed it from the cyanogenmod file manager.

我尝试通过电子邮件安装它 - 成功了.我尝试从 adb 安装它 - 成功了.

I tried to install it from email - worked. I tried to install it from adb - worked.

这篇关于解析清单时签名的apk解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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