Android Studio 正在设备上安装旧的 apk [英] Android Studio is installing old apk on device

查看:58
本文介绍了Android Studio 正在设备上安装旧的 apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用模拟器和 Nexus 4 设备使用 Android Studio(0.89 Build #AI-135.1404660,构建于 2014 年 9 月 3 日)开发 Android 应用.

I am developing an Android app using Android Studio (0.89 Build #AI-135.1404660, Built on Sept 3,2014) using both emulator and Nexus 4 device.

我在之前的版本中遇到了同样的问题.

I had the same issue with a version prior to that.

问题是我修改了代码和资源文件后,还是在设备或模拟器上安装了旧的apk.

The problem is that after I changed my code and resource files, I still get the old apk installed on the device or emulator.

我需要做什么才能让它运行当前代码?是建筑配置吗?

What do I need to do to get it to run current code? Is it a building config?

这是 Android Studio 的已知问题吗?

Is it a known issue with Android Studio?

或者使用 Nexus 4 设备?

Or with a Nexus 4 device?

这是第二次发生,我在尝试以下步骤之一后解决了它(当时).他们再也没有为我工作过.

This is the second time it has happened, and I resolved it(then) after trying one of the steps below. They have not worked for me again.

这是我试过的

  1. 构建 > 清理项目 >​​ 重启 Android Studio > 运行
  2. 构建 > 重建项目 > 运行
  3. 步骤 1 加上在设备上卸载 apk
  4. 第 2 步加上在设备上卸载 apk
  5. 添加错误的资源条目然后运行.

我已阅读以下内容:

  1. Android apk 安装:如何清除文件旧版本?
  2. adb - 如何重新安装应用程序,无需保留数据?
  3. 设备仍然有旧的 apk
  4. Android 版本没有不更新设备上目标 .apk 的代码库或资源

到目前为止没有任何效果.

None has worked so far.

推荐答案

行为不稳定.我通过查看我的代码解决了它,结果是有一个无效的资源文件.尝试在当前更改之前恢复到您的代码的最后一个工作版本......可能是一个已知问题,将/已在 Beta 版之外解决

The behaviour is erratic. I solved it by reviewing my code.It turned out that there was a resource file that was invalid. Try reverting back to the last working version of your code before the current changes... Probably a known issue that will be/was resolved out of Beta

这篇关于Android Studio 正在设备上安装旧的 apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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