【问题标题】:App not installed未安装应用程序
【发布时间】:2016-01-02 20:00:09
【问题描述】:

当我尝试在发布模式下安装我的 apk 时遇到问题,如果我下载调试文件,它可以正常工作,但如果我尝试安装发布文件,它只会说我“未安装应用程序”,图片:

这是我的清单文件:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="PACKAGE" >

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".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=".ReportActivity"
            android:label="@string/title_activity_report" >
        </activity>

        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@string/google_maps_key"/>

        <service
            android:name=".Services.PositioningService"
            android:enabled="true"
            android:exported="true" >
        </service>

        <receiver
            android:name=".Receiver.PositioningBroadcastReceiver"
            android:enabled="true"
            android:exported="true" >
        </receiver>


    </application>

</manifest>

我已经检查过这个链接,但它不起作用! App Not Installed error 谢谢各位!

【问题讨论】:

  • 检查您的设备中是否已经安装了相同包名的应用程序。设备中不能存在两个相同包名的应用程序。

标签: android android-manifest apk release


【解决方案1】:

如果您在手机中安装了调试版本。那么您需要将其卸载并安装签名版本。

如果它仍未安装,那么您的应用程序相关数据可能仍在您的内存中。例如)如果您从应用程序创建了任何数据库,那么您需要从内存中删除它并尝试再次安装您的签名版本。

如果它仍未安装并且您正在使用棒棒糖设备..您的应用程序也可能安装在其他用户帐户中..您切换到其他用户并转到设置->应用程序->您的应用程序并卸载它。 甚至检查来宾用户。您的应用程序可能也隐藏在其中..

我遇到了这个问题..只需按照这些步骤..然后您的应用程序就可以安装.. :)

【讨论】:

  • 是的,愚蠢的我,有另一个应用程序实例,名称不同但标识符相同。
【解决方案2】:

首先打开 Build-Variants 窗口(左下角),您可以在两列(命名为模块和构建变体)表中看到属于您应用程序一部分的模块,将所有模块构建变体更改为发布,然后在您的 build.gradle 文件中将 minifyEnabled 从 true 更改为 false:

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

现在尝试使用有效的发布密钥签署您的 apk,如果您的设备已经安装了使用不同密钥或其调试版本的 apk,请将其卸载并安装您的发布版本(当用户尝试更新您的应用时,它不会是问题,因为您肯定会在市场上使用与以前相同的密钥上传发布版本。

【讨论】:

  • 我想缩小构建,我不能将 false 设置为 minifyEnabled
【解决方案3】:

当我尝试从 playstore 安装发布版本时,我也遇到了同样的问题。

解决方案: 问题的原因是在将发布版本上传到 playstore 之前,我没有在模块的 build.gradle 中增加 versionCode

【讨论】:

    【解决方案4】:

    如果是 Android 9,请尝试禁用 Google Play Protect。就我而言,是在我卸载某个版本的 App 并尝试安装新版本时。我收到错误“未安装应用程序”。

    打开 Play 商店 -> 菜单按钮(右上角的按钮)-> 禁用选项扫描设备是否存在安全威胁

    【讨论】:

      【解决方案5】:

      就我而言,它不起作用,因为我试图通过 .aab 包文件安装 apk 文件。

      从商店安装的版本之间的更新在 aab 中发布,无法更新到 apk 文件。

      同时,从 master 分支构建一个 apk 文件,然后将其更新为 apk 工作正常。

      【讨论】:

        【解决方案6】:

        为此,您必须清除应用程序安装程序或软件包安装程序的数据。也是由于未知应用信任com.android.packageinstaller.user.AppInstallSecurity的服务引起的,也禁用这个!,你的android也被损坏或被版本授权,更新到12以防止这个错误。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2019-02-03
          • 1970-01-01
          • 1970-01-01
          • 2013-07-01
          • 1970-01-01
          • 2021-07-03
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多