如何理解为什么android无法安装apk文件?

How to understand why android can't install apk file?

我在 Eclipse 中使用现有项目。

这是一个 Android 应用程序。

Eclipse 显示项目中没有构建错误。

我可以 运行 它作为 Android 应用程序在我的 Android 设备上。没问题。

当我使用 Export - Export Android Appliction 构建 apk 文件时,将 apk 文件复制到 Android 设备上并尝试 运行(安装)它要求安装

当按下 Install 时,它会显示 Installing... string 一段时间 然后显示未安装应用程序。

如何理解错误原因? 获取有关程序安装失败原因的更多详细信息?

我有 Eclipse 4.2.2

项目构建目标 4.0.3

Android 版本 phone 是 5.0.1

这里是AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.syclo.agentry.client.android"
    android:installLocation="auto"
    android:versionCode="70010000"
    android:versionName="70.10.0" >

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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />

    <permission
        android:name="com.syclo.agentry.client.android.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.syclo.agentry.client.android.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <permission-group
        android:name="com.syclo.agentry.client.android.permission.group.AGENTRY"
        android:description="@string/permission_group_agentry_description"
        android:label="@string/permission_group_agentry_label" />

    <permission
        android:name="com.syclo.agentry.client.android.permission.AGENTRY_IPC"
        android:description="@string/permission_ipc_description"
        android:label="@string/permission_ipc_label"
        android:permissionGroup="com.syclo.agentry.client.android.permission.group.AGENTRY"
        android:protectionLevel="dangerous" />

    <application
        android:name=".AgentryAndroidClient"
        android:hardwareAccelerated="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:logo="@drawable/logo"
        android:theme="@style/AgentryDefault" >
        <activity
            android:name=".ui.builtin.StartupActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/app_name_short"
            android:noHistory="true"
            android:theme="@style/AgentryDefault.NoTitleBar.FullScreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.builtin.SplashActivity"
            android:label="@string/app_name_short"
            android:noHistory="true"
            android:theme="@style/AgentryDefault.NoTitleBar.FullScreen" />
        <activity
            android:name=".ui.builtin.ServerSelectionActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/server_select"
            android:theme="@style/AgentryDefault.ActionBar" />
        <activity
            android:name=".ui.builtin.LoginActivity"
            android:configChanges="orientation|keyboardHidden"
            android:launchMode="singleTask"
            android:theme="@style/AgentryDefault.ActionBar"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".ui.builtin.LogoutDialogActivity"
            android:excludeFromRecents="true"
            android:label="@string/app_name_short"
            android:noHistory="true"
            android:theme="@android:style/Theme.Dialog" />
        <activity
            android:name=".ui.builtin.IdleTimeoutActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/welcome"
            android:launchMode="singleTask"
            android:theme="@style/AgentryDefault.ActionBar"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".ui.builtin.ModuleMenuActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/module_menu"
            android:launchMode="singleTop"
            android:theme="@style/AgentryDefault.ActionBar" />
        <activity
            android:name=".ui.builtin.AboutBoxActivity"
            android:configChanges="orientation|keyboardHidden"
            android:theme="@style/AgentryDefault.NoTitleBar" />
        <activity
            android:name=".ui.builtin.PasswordChangeActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/passwd_change_title"
            android:theme="@style/AgentryDefault.ActionBar"
            android:windowSoftInputMode="adjustResize" />
        <activity
            android:name=".ui.builtin.TransmitActivity"
            android:configChanges="orientation|keyboardHidden"
            android:label="@string/transmit_title"
            android:theme="@style/AgentryDefault.ActionBar" />
        <activity
            android:name=".ui.screensets.TabbedScreenSetActivity"
            android:configChanges="orientation|keyboardHidden"
            android:theme="@style/AgentryDefault.ActionBar"
            android:uiOptions="splitActionBarWhenNarrow" />
        <activity
            android:name=".ui.screensets.WizardScreenSetActivity"
            android:configChanges="orientation|keyboardHidden"
            android:theme="@style/AgentryDefault.ActionBar"
            android:uiOptions="splitActionBarWhenNarrow" />
        <activity
            android:name=".ui.screensets.OverlayScreenSetActivity"
            android:configChanges="orientation|keyboardHidden"
            android:theme="@style/AgentryActivityDialog" />
        <activity
            android:name=".ipc.IntentReceiver"
            android:exported="true"
            android:permission="com.syclo.agentry.client.android.permission.AGENTRY_IPC"
            android:theme="@android:style/Theme.NoDisplay" />
        <activity
            android:name="com.google.zxing.client.android.CaptureActivity"
            android:configChanges="orientation|keyboardHidden"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:windowSoftInputMode="stateAlwaysHidden" >
        </activity>
        <activity
            android:name="org.openintents.filemanager.FileManagerActivity"
            android:configChanges="orientation"
            android:label="@string/app_name" />

        <receiver
            android:name=".ui.builtin.GCMReceiver"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <category android:name="com.syclo.agentry.client.android" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />

                <category android:name="com.syclo.agentry.client.android" />
            </intent-filter>
        </receiver>
        <receiver android:name=".ui.builtin.TimeZoneChangeReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.TIMEZONE_CHANGED" />

                <category android:name="com.syclo.agentry.client.android" />
            </intent-filter>
        </receiver>

        <activity
            android:name=".ZNFC"
            android:label="@string/title_activity_znfc" >
        </activity>
    </application>

</manifest>

只需 goto -> Settings -> Applications -> findyourapp 并卸载它,之后会 works/or 安装。