【问题标题】:Application from Android Studio won't install from signed APK, does installs fine over ADB来自 Android Studio 的应用程序不会从签名的 APK 安装,在 ADB 上安装得很好
【发布时间】:2017-05-18 09:56:37
【问题描述】:

我在我的手机和其他手机上安装我的应用程序时遇到了问题,它是 APK。当我通过 ADB 从 Android Studio 的运行按钮加载应用程序时,它安装得很好,没有任何问题,但是当我生成一个签名的 APK 并将其侧载到我的设备上(调试和发布)时,它会抛出一个错误,提示“应用程序未安装。”

我真的到处寻找这个问题的答案,但我找不到任何东西,以前有没有其他人遇到过这个问题?

这是问题的视频https://www.youtube.com/watch?v=S1EbAULdrqs

以下是有关我的应用的一些信息。 它使用 ZXing,因此它使用手机摄像头,从视频中可以看出,我在清单中声明了适当的权限,但我的清单仍然如下:

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

    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-feature
        android:name="android.hardware.camera2"
        android:required="true"/>

    <uses-feature
        android:name="android.hardware.Camera"
        android:required="false" />

    <uses-feature
        android:name="android.hardware.Camera.autofocus"
        android:required="false" />


    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".ScannerActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

以防您认为在清单中说明旧相机已经结束了,我已经尝试在没有这个的情况下安装它,但它仍然无法正常工作。

任何帮助将不胜感激。

【问题讨论】:

  • 有时,我也会遇到同样的问题......但我只是卸载了应用程序并重新安装了 APK,它安装得很好。
  • 我已经尝试过了,我什至清除了数据,卸载,重新启动并尝试安装应用程序但没有!好痛哈哈

标签: android android-studio installation adb


【解决方案1】:

我也遇到了同样的问题,在确认我的 Android 设备将在 google play store 之外运行应用程序后,检查构建版本,检查 api 版本,生成 2 个不同的密钥库(当然你只需要一个),并且生成签名的发布 apk 版本,我的 apk 也不会安装在我的设备上。

我的“修复”是重启安卓设备。 (并确保我在制作应用程序期间在设备上安装的任何版本的应用程序都已从设备上卸载)

我希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-15
    • 1970-01-01
    • 1970-01-01
    • 2011-12-12
    • 2023-04-08
    • 1970-01-01
    相关资源
    最近更新 更多