Studio不会在设备上安装最新的应用程序

Studio不会在设备上安装最新的应用程序

本文介绍了Android Studio不会在设备上安装最新的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注一些有关在Android Studio中构建应用程序的教程,但是由于某些原因,当我单击运行"时,它不会启动/安装最新版本的应用程序.我必须手动在手机上卸载该应用程序,然后在Android Studio中进行更改后单击运行",以使该应用程序得到更新.有什么想法吗?

I'm following some tutorials about building apps in Android Studio, but for some reason it's not launching/installing the latest version of my app when I click 'run'. I have to manually uninstall the app on the phone and then click run after making changes in Android Studio for the app to get updated. Any ideas?

这是控制台输出:

Waiting for device.
Target device: htc-htc_one_m8
Uploading file
    local path: /home/brandon/AndroidStudioProjects/JustJava/app/build/outputs/apk/app-debug.apk
    remote path: /data/local/tmp/com.example.android.justjava
No apk changes detected. Skipping file upload, force stopping package instead.
DEVICE SHELL COMMAND: am force-stop com.example.android.justjava
Launching application: com.example.android.justjava/com.example.android.justjava.MainActivity.
DEVICE SHELL COMMAND: am start -D -n "com.example.android.justjava/com.example.android.justjava.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.justjava/.MainActivity }

Waiting for process: com.example.android.justjava
Connected to the target VM, address: 'localhost:8638', transport: 'socket'
Disconnected from the target VM, address: 'localhost:8638', transport: 'socket'

推荐答案

Android Studio认为没有任何变化,因此未安装新的APK.解决方法是在运行">编辑配置"中禁用如果APK尚未更改,请跳过安装"选项.

Android Studio thinks that there are no changes and doesn't install the new APK. A workaround is to disable the "Skip installation if APK has not changed" option in Run > Edit Configurations.

我正在使用Android Studio 1.4
来源: https://code.google.com/p/android/issues/detail?id = 160901

I'm using Android Studio 1.4
Source: https://code.google.com/p/android/issues/detail?id=160901

这篇关于Android Studio不会在设备上安装最新的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 09:19