Android清单安装解析失败清单格式错误

时间:2014-07-07 00:12:07

标签: android manifest google-cloud-messaging malformed

我将我的Android项目从PC切换到Mac,从那时起就无法编译。我看到所有这些建议,如重命名和添加"。"在包名称前面,但从我看到的内容中,它们都不适用于我的项目。我知道这是一个非常简单的解决方案,我似乎无法弄明白。如果你能提供帮助,非常感谢你。

我一直得到以下

[2014-07-06 19:55:50 - TutorRow] Android Launch!
[2014-07-06 19:55:50 - TutorRow] adb is running normally.
[2014-07-06 19:55:50 - TutorRow] Performing com.example.tutorrow.MainActivity activity launch
[2014-07-06 19:55:50 - TutorRow] Automatic Target Mode: using device '5f0bf58a'
[2014-07-06 19:55:50 - TutorRow] Uploading TutorRow.apk onto device '5f0bf58a'
[2014-07-06 19:55:52 - TutorRow] Installing TutorRow.apk...
[2014-07-06 19:55:57 - TutorRow] Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
[2014-07-06 19:55:57 - TutorRow] Please check logcat output for more details.
[2014-07-06 19:55:57 - TutorRow] Launch canceled!

我的清单文件在这里

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

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

    <uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>  
    <uses-permission android:name="android.permission.INTERNET" ></uses-permission>
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" ></uses-permission>
    <uses-permission android:name="android.permission.GET_ACCOUNTS"></uses-permission>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />
    <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_SYNC_STATS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />

    <permission android:name="com.example.gcm.permission.C2D_MESSAGE" android:protectionLevel="signature" />

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

    <meta-data android:name="com.google.android.gms.version" />
<!--  IN OLD MANIFEST ON PC android:value="@integer/google_play_services_version" />-->

        <receiver
            android:name=".GcmBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="com.example.gcm" />
            </intent-filter>
            </receiver>
        <service android:name=".GcmIntentService" />
        <activity
            android:name="com.example.tutorrow.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="com.example.tutorrow.Dashboard"
            android:label="@string/title_activity_dashboard" >
        </activity>
        <activity
            android:name="com.example.tutorrow.SignUpActivity"
            android:label="@string/title_activity_sign_up" >
        </activity>
        <activity
            android:name="com.example.tutorrow.MoreClasses"
            android:label="@string/title_activity_more_classes" >
        </activity>
    </application>
</manifest>

这是logcat

07-06 20:08:18.255: D/AndroidRuntime(15626): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
07-06 20:08:18.255: D/AndroidRuntime(15626): CheckJNI is OFF
07-06 20:08:18.255: D/AndroidRuntime(15626): setted country_code = USA
07-06 20:08:18.255: D/AndroidRuntime(15626): setted countryiso_code = US
07-06 20:08:18.255: D/AndroidRuntime(15626): setted sales_code = VZW
07-06 20:08:18.255: D/AndroidRuntime(15626): readGMSProperty: start
07-06 20:08:18.255: D/AndroidRuntime(15626): readGMSProperty: already setted!!
07-06 20:08:18.255: D/AndroidRuntime(15626): readGMSProperty: end
07-06 20:08:18.255: D/AndroidRuntime(15626): addProductProperty: start
07-06 20:08:18.275: D/dalvikvm(15626): Trying to load lib libjavacore.so 0x0
07-06 20:08:18.285: D/dalvikvm(15626): Added shared lib libjavacore.so 0x0
07-06 20:08:18.285: D/dalvikvm(15626): Trying to load lib libnativehelper.so 0x0
07-06 20:08:18.285: D/dalvikvm(15626): Added shared lib libnativehelper.so 0x0
07-06 20:08:18.285: D/dalvikvm(15626): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
07-06 20:08:18.355: D/AT_Distributor(437): Send Msg [UART > ATD] 1 bytes <>
07-06 20:08:18.466: E/memtrack(15626): Couldn't load memtrack module (No such file or directory)
07-06 20:08:18.466: E/android.os.Debug(15626): failed to load memtrack module: -2
07-06 20:08:18.516: D/dalvikvm(15626): Note: class Landroid/app/ActivityManagerNative; has 192 unimplemented (abstract) methods
07-06 20:08:18.626: D/AndroidRuntime(15626): Calling main entry com.android.commands.pm.Pm
07-06 20:08:18.676: D/EnterpriseDeviceManager(808): ContainerId: 0
07-06 20:08:18.676: V/PackageManager(808): Install from ADB
07-06 20:08:18.676: D/PackageManager(808): START_PACKAGE_INSTALL: observer{1127009496}
07-06 20:08:18.676: D/PackageManager(808):           PackageURI{file:///data/local/tmp/TutorRow.apk}
07-06 20:08:18.676: D/PackageManager(808): [MSG] INIT_COPY: observer{1127009496}
07-06 20:08:18.676: D/PackageManager(808):           idx{0}
07-06 20:08:18.676: D/PackageManager(808):           for_user{UserHandle{-1}}
07-06 20:08:18.676: D/PackageManager(808): Trying to bind to DefaultContainerService
07-06 20:08:18.686: D/PackageManager(808): onServiceConnected
07-06 20:08:18.686: D/PackageManager(808): [MSG] MCS_BOUND
07-06 20:08:18.686: D/PackageManager(808): [MSG] MCS_BOUND: observer{1127009496}
07-06 20:08:18.686: D/PackageManager(808):           for_user{UserHandle{-1}}
07-06 20:08:18.696: E/PersonaManagerService(808): Unable to read user list
07-06 20:08:18.706: I/ServiceKeeper(808): In getseinfo pid = 808 uid = 1000 seinfo= system
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage  
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage com.example.tutorrow
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage getting setupWizardApkLocation
07-06 20:08:18.706: I/ServiceKeeper(808): In getseinfo pid = 808 uid = 1000 seinfo= system
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage setupWizardApkLocation is null
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage setupWizardApkLocation == null 
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage getting handlerApkLocation
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage handlerApkLocation is null
07-06 20:08:18.706: D/PersonaManagerService(808): needVerificationForPackage handlerApkLocation == null 
07-06 20:08:18.706: D/PackageManager(808): Found 1 verifiers for intent Intent { act=android.intent.action.PACKAGE_NEEDS_VERIFICATION dat=file:///data/local/tmp/TutorRow.apk typ=application/vnd.android.package-archive flg=0x1 } with 0 optional verifiers
07-06 20:08:18.716: D/Finsky(15286): [1] PackageVerificationReceiver.onReceive: Verification requested, id = 33
07-06 20:08:18.716: E/PersonaManagerService(808): Unable to read user list
07-06 20:08:18.726: D/Finsky(15286): [1] WorkerTask.onPreExecute: Verification Requested for id = 33, data=file:///data/local/tmp/TutorRow.apk flags=114 fromVerificationActivity=false
07-06 20:08:18.726: I/HarmonyEASService(808): Updating for all 1
07-06 20:08:18.726: I/PackageManager(808): remove MCS_UNBIND message and Posting MCS_UNBIND 10 secs later
07-06 20:08:18.766: D/Finsky(15286): [7226] PackageVerificationService.getPackageInfo: Cannot read archive for file:///data/local/tmp/TutorRow.apk in request id=33
07-06 20:08:18.766: W/PackageParser(15286): /data/local/tmp/TutorRow.apk (at Binary XML file line #37): <meta-data> requires an android:value or android:resource attribute
07-06 20:08:18.766: D/PackageManager(808): [MSG] PACKAGE_VERIFIED: observer{1127009496}
07-06 20:08:18.766: D/PackageManager(808):           verificationId{33}
07-06 20:08:18.776: D/Finsky(15286): [1] PackageVerificationReceiver.onReceive: Verification requested, id = 33
07-06 20:08:18.786: D/PackageManager(808): copyApk
07-06 20:08:18.796: I/PersonaManager(15612): getPersonaService() name persona_policy
07-06 20:08:18.816: E/ScoreCenter - UALib(15612): In-App Purchase is enabled, but missing com.android.vending.billing.IMarketBillingService. Disabling...
07-06 20:08:18.816: E/ScoreCenter - UALib(15612): If using Proguard, add the following lines to your proguard.cfg:
07-06 20:08:18.816: E/ScoreCenter - UALib(15612):   -keep class com.android.vending.billing.**
07-06 20:08:18.936: I/PackageManager(808): Copying native libraries to /data/app-lib/vmdl-487134073
07-06 20:08:18.946: D/PackageManager(808): remove MCS_UNBIND and Posting MCS_UNBIND
07-06 20:08:18.946: D/PackageManager(808): [MSG] PROCESS_PENDING_INSTALL: observer{1127009496}
07-06 20:08:18.946: D/PackageManager(808): installPackageLI
07-06 20:08:18.946: W/PackageParser(808): /data/app/vmdl-487134073.tmp (at Binary XML file line #37): <meta-data> requires an android:value or android:resource attribute
07-06 20:08:18.946: D/PackageManager(808): doPostInstall for uid{-1}
07-06 20:08:19.356: I/PowerManagerService(808): [PWL] Off : 15s ago
07-06 20:08:19.387: E/Watchdog(808): !@Sync 5334
07-06 20:08:19.797: E/SMD(173): DCD ON
07-06 20:08:21.989: D/PackageManager(808): delete sourFile : 
07-06 20:08:21.989: D/PackageManager(808): delete native library directory: 
07-06 20:08:21.989: D/PackageManager(808): + starting rerstore round-trip 36
07-06 20:08:21.989: D/PackageManager(808): No resotre for backup - queue post-install for 36
07-06 20:08:22.029: D/EnterpriseDeviceManager(808): ContainerId: 0
07-06 20:08:22.029: D/EnterpriseDeviceManager(808): ContainerId: 0
07-06 20:08:22.029: I/PackageManager(808):   Action: "android.intent.action.SENDTO"
07-06 20:08:22.029: I/PackageManager(808):   Category: "android.intent.category.DEFAULT"
07-06 20:08:22.029: I/PackageManager(808):   Scheme: "sms"
07-06 20:08:22.029: I/PackageManager(808): Adding preferred activity ComponentInfo{com.android.mms/com.android.mms.ui.ConversationComposer} for user 0 :
07-06 20:08:22.089: D/EnterpriseDeviceManager(808): ContainerId: 0
07-06 20:08:22.089: I/PackageManager(808):   Action: "android.intent.action.SENDTO"
07-06 20:08:22.089: I/PackageManager(808):   Category: "android.intent.category.DEFAULT"
07-06 20:08:22.089: I/PackageManager(808):   Scheme: "smsto"
07-06 20:08:22.089: I/PackageManager(808): Adding preferred activity ComponentInfo{com.android.mms/com.android.mms.ui.ConversationComposer} for user 0 :
07-06 20:08:22.119: D/EnterpriseDeviceManager(808): ContainerId: 0
07-06 20:08:22.119: I/PackageManager(808):   Action: "android.intent.action.SENDTO"
07-06 20:08:22.119: I/PackageManager(808):   Category: "android.intent.category.DEFAULT"
07-06 20:08:22.119: I/PackageManager(808):   Scheme: "mms"
07-06 20:08:22.119: I/PackageManager(808): Adding preferred activity ComponentInfo{com.android.mms/com.android.mms.ui.ConversationComposer} for user 0 :
07-06 20:08:22.139: D/EnterpriseDeviceManager(808): ContainerId: 0
07-06 20:08:22.139: I/PackageManager(808): Adding preferred activity ComponentInfo{com.android.mms/com.android.mms.ui.ConversationComposer} for user 0 :
07-06 20:08:22.149: I/PackageManager(808):   Action: "android.intent.action.SENDTO"
07-06 20:08:22.149: I/PackageManager(808):   Category: "android.intent.category.DEFAULT"
07-06 20:08:22.149: I/PackageManager(808):   Scheme: "mmsto"
07-06 20:08:22.190: D/PackageManager(808): [MSG] MCS_UNBIND
07-06 20:08:22.190: D/PackageManager(808): Trying to unbind to DefaultContainerService
07-06 20:08:22.190: D/PackageManager(808): [MSG] POST_INSTALL: observer{1127009496}
07-06 20:08:22.190: D/PackageManager(808):           Handling post-install for 36
07-06 20:08:22.190: D/PackageManager(808): return install result to caller: 1127009496
07-06 20:08:22.190: D/PackageManager(808): returnCode: -108
07-06 20:08:22.220: D/AndroidRuntime(15626): Shutting down VM
07-06 20:08:22.220: D/jdwp(15626): Got wake-up signal, bailing out of select
07-06 20:08:22.220: D/dalvikvm(15626): Debugger has detached; object registry had 1 entries
07-06 20:08:22.560: D/dalvikvm(808): GC_EXPLICIT freed 5201K, 39% free 37571K/60888K, paused 21ms+27ms, total 372ms

0 个答案:

没有答案