会话"app":安装APK时出错 [英] Session 'app': Error Installing APK

查看:240
本文介绍了会话"app":安装APK时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照以下说明尝试在真实设备上安装应用:- http://developer.android.com/tools/device.html .最后,Android Studio给出了错误:

Trying to install app on real device following instructions:- http://developer.android.com/tools/device.html. At end Android Studio giving error:

Session 'app': Error Installing APK 

我猜问题可能出在我的Android设备上(这是中文的Doogee X5).它在开发人员文档中没有给定的USB供应商ID,因此我决定按照HTC提供的带有随机供应商ID的说明进行操作.

I guess the problem probably can be in my android device(it is chinese Doogee X5). It does not have a given USB Vendor ID in developer docs so I decided to follow instructions with random vendor ID from HTC.

我确定可以在任何android设备上运行应用程序,但是我没有找到解决方法.

I'm sure there is a way to run application on any android device, but yet I didn't find an answer on how to do that.

我正在通过Linux Ubuntu 14.04 LTS运行

I'm running through Linux Ubuntu 14.04 LTS

推荐答案

在较新的Android Studio版本中,您可以使用以下按钮重新同步项目:

In newer Android Studio versions you can re-sync the project using this button:

对于旧版本:

打开Gradle窗口(在Android Studio的右侧),然后单击刷新按钮.

但是,这不是100%确定的修复程序.

However it is not a 100% sure fix.

其他情况下的解决方案:

Solutions for other cases:

打开终端窗口并键入"adb kill-server",然后键入"adb start-server".通常在闲置几个小时后,adb用来断开设备连接. (如果PATH环境变量中没有sdk/platform-tools,则应在该文件夹中打开一个终端)

Open terminal window and type "adb kill-server", then type "adb start-server". Usually after a few hours of inactivity, adb used to disconnect the device. (If you don't have the sdk/platform-tools in the PATH environment variable, then you should open a terminal in that folder)

如果这些解决方案不能帮助您,请给您一个提示: 如果您打开Android Studio右下角的事件日志"窗口,则会看到详细的错误消息.

One tip if these solutions don't help you: If you open the Event Log window in the right bottom corner of Android Studio, you can see a detailed error message.

其他极端情况 如果看到此错误:INSTALL_FAILED_INVALID_APK:...签名不一致. 然后不幸的是,gradle刷新还不够,您必须转到Build-> Clean Project,然后再次运行.

Other edge case If you see this error: INSTALL_FAILED_INVALID_APK:... signatures are inconsistent. Then unfortunately a gradle refresh isn't enough, you have to go to Build -> Clean Project and then Run again.

Android模拟器问题 如果要将APK部署到Android仿真器,并且看到安装APK错误"消息,则您的仿真器可能已冻结,需要重新启动.

Issue with Android emulator If you want to deploy the APK to an Android Emulator and you see the "Error installing APK" message, your emulator may be frozen and need restart.

这篇关于会话"app":安装APK时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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