安装失败,原因是:'null' - Android Studio 3.5 [英] Installation failed due to: 'null' - Android Studio 3.5

查看:77
本文介绍了安装失败,原因是:'null' - Android Studio 3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我遇到 APK 安装问题以来,我已将 Android Studio 更新到 3.5.这是它显示的唯一日志:

I have updated Android studio to 3.5, ever since I am running into an APK installation problem. This is the only log it shows:

Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION
Installation failed due to: 'null'
Retry

尝试在真实设备上安装 APK 时会发生这种情况.如果我从设备上卸载该应用程序,然后重新运行构建,它只会安装一次,然后在下一次安装时不断抛出此错误.它在模拟器上运行良好,但我不能在所有情况下都使用模拟器.

This happens when trying to install APK on a real device. If I uninstall the app from the device and then rerun the build, it installs only one time and then it keeps throwing this error on the next installation. It runs fine on an emulator but I can not use an emulator for everything.

我尝试过的:

  • 已删除 Android Studio 配置文件.
  • 从项目中删除了 Gradle 文件.
  • 使缓存无效并重置.
  • 清理/重建项目.
  • 寻找类似的问题 Stackoverflow(没有任何符合我的问题)
  • 干净安装(删除了包括 SDK 在内的所有文件)Android Studio 3.5

更新

我在我的机器上安装了 Linux Mint 并在那里测试了 AS 3.5,出于某种原因,即使对于 Android 7 及以下设备,一切都运行良好.

I installed Linux Mint on my machine and tested the AS 3.5 there, for some reason everything is working fine even for Android 7 and below devices.

以前的操作系统:Windows 10 1903

Previous OS: Windows 10 1903

当前操作系统:Linux Mint 19.2

Current OS: Linux Mint 19.2

我认为这个问题可能源于 Windows 机器.

I reckon this problem may be originating from Windows machines.

推荐答案

Open Run/Debug Configuration 对话框(Windows:Run > Edit Configurationskbd>)

Open Run/Debug Configuration dialog (Windows: Run > Edit Configurations)

编辑 您的应用程序 >一般 >安装选项 >安装标志 .

edit You app > General > Installation Options > Install Flags .

添加安装标志-r -t.

这个标志意味着 adb install -r -t apkpath

这篇关于安装失败,原因是:'null' - Android Studio 3.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆