未安装应用

App not installed

当我尝试在发布模式下安装我的 apk 时遇到问题,如果我下载调试文件,它工作正常,但如果我尝试安装发布文件,它只是说我 "App not installed", 图片:

这是我的清单文件:

<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>

我已经检查过这个 link,但是没有用! App Not Installed error 谢谢大家!

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

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

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

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

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

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

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

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

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

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

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

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

从 aab 中发布的商店安装的版本之间的更新不可能更新到 apk 文件。

同时从master分支构建一个apk文件,然后更新为apk就可以了。

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

在您的 build.gradle 应用程序模块中,将 minifyEnabled 设置为 false。缩小可能会混淆您的代码,使其不那么可用。 像这样

 buildTypes {
    release {
        //debuggable true
        minifyEnabled false // specify minify enabled to false
        signingConfig signingConfigs.release
 
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }

可能有很多原因。为了更好地排除故障,您应该使用以下命令在您的计算机上安装 APK:

adb install your-app.apk

然后您会得到更详细的错误消息 google。