2016-01-15 101 views
0

我在Eclipse中使用現有的項目。如何理解android爲什麼不能安裝apk文件?

這是一個Android應用程序。

Eclipse在項目中顯示沒有生成錯誤。

我可以在Android設備上將它作爲Android應用程序運行。沒問題。

當我生成使用導出APK文件 - 導出的Android機應用,複製Android設備上apk文件,並嘗試運行(安裝),它要求安裝

enter image description here

時按安裝它顯示了安裝.. 。字符串有一段時間 然後顯示應用程序未安裝。

enter image description here

如何理解錯誤的原因是什麼? 獲取有關程序未能安裝的更多詳細信息?

我的Eclipse 4.2.2

項目建設目標4.0.3

手機的Android版本是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>

+1

聽起來你已經安裝了應用程序,但簽名不同。如果是這樣,你必須先卸載它。 – Floern

+0

是的,它有幫助。問題解決了。謝謝。 – DmitryB

回答

0

只需goto -> Settings -> Applications -> findyourapp並卸載它,它將工作/或之後安裝。