安装我的应用程序时安装LG Optimus时程序包安装程序崩溃

时间:2012-03-13 03:54:36

标签: android launcher

当我在模拟器中运行我的应用程序时,它运行正常。当我将其(电子邮件)发送到我的手机时,会出现以下消息:

抱歉!应用程序包安装程序(process.com.android.packageinstaller)意外停止。请再试一次。

我已经在SO上尝试过针对类似问题的解决方案,并且已经通过Google查找了可行的解决方案,到目前为止无济于事。

这是我的清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="application.android"
  android:versionCode="1"
  android:versionName="1.0"
  android:installLocation="auto">
<uses-sdk android:minSdkVersion="8" />
<uses-permission  android:name="android.permission.INTERNET"/>
<application android:icon="@drawable/icon" 
    android:label="@string/app_name"
    android:permission="android.permission.INTERNET">        
    <activity android:name=".MainActivity"
              android:label="@string/app_name"
              android:screenOrientation="portrait"
              android:theme="@android:style/Theme.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".HistoryActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>
    <activity android:name=".DiagnosisActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>      
    <activity android:name=".eula"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>      
    <activity android:name=".disclaimer"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>    
    <activity android:name=".DetailsActivity"
        android:label ="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>        
    <activity android:name=".ResultsActivity"
        android:label ="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>        
    <activity android:name=".DiagnosisNoteActivity"
        android:label ="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>        
    <activity android:name=".NewDiagnosisActivity"
        android:label ="@string/app_name" 
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>      
    <activity android:name=".DiagnosisTabActivityGroup"
        android:label ="@string/app_name" 
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>        
    <activity android:name=".TabGroupActivity"
        android:label ="@string/app_name" 
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>        
    <activity android:name=".SplashActivity"
        android:label ="@string/app_name" 
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>       
    <activity android:name=".NewScreenActivity"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar"></activity>
</application>

通过Eclipse在我的手机上调试时,控制台中会显示以下内容:

[2012-03-12 23:38:52 - ruleout] Android Launch!
[2012-03-12 23:38:52 - ruleout] adb is running normally.
[2012-03-12 23:38:52 - ruleout] Performing ruleout.android.MainActivity activity launch
[2012-03-12 23:38:54 - ruleout] Uploading ruleout.apk onto device 'A0000028F2ABCF'
[2012-03-12 23:39:11 - ruleout] Installing ruleout.apk...
[2012-03-12 23:40:16 - ruleout] Success!
[2012-03-12 23:40:16 - ruleout] Starting activity ruleout.android.MainActivity on device A0000028F2ABCF
[2012-03-12 23:40:17 - ruleout] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=ruleout.android/.MainActivity }
[2012-03-12 23:40:17 - ruleout] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=ruleout.android/.MainActivity } from null (pid=16174, uid=2000) requires android.permission.INTERNET

LogCat窗口中没有显示任何内容,据我所知,我已启用了互联网权限。此外,我确实将android:debuggable =“true”属性添加到应用程序标记。

2 个答案:

答案 0 :(得分:1)

我设法解决了这个问题,所以对于遇到同样问题的人来说,如果从清单中的应用程序标签中删除android:permission属性,那么它就像魅力一样。

答案 1 :(得分:0)

你在调试吗?如果是这样,您将需要添加“android:debuggable”您的应用程序标记,如下所示:

<application 
    android:icon="@drawable/icon" 
    android:label="@string/app_name"
    android:debuggable="true" 

您还应检查手机是否处于调试模式(设置&gt;应用程序&gt;调试)