Android Studio generating old version APK

荒凉一梦 提交于 2021-01-29 08:32:55

问题


I looked at other solutions for the above problem, but none of them seem to resolve my issue. I am running AS 3.5.2, under Help/About/Check for new versions everything is showing as fully updated.

I am using Windows. When I plug my phone into my computer, it runs the latest updated version. When I Build APK(s) under Build menu, and then install that version onto my phone, it is an old version.

Up until about 2 weeks ago it was building APKs fine, and today after making a few code changes (been 2 weeks about since I last made changes), it now has this issue.

What I've tried: 1. build.grade (app) - changed the version code and name to 2 from 1 2. Build menu - clean & rebuild project 3. Checked for updates and updated as needed 4. Run/Debug configurations - confirmed Gradle-aware Make is present (even removed then re-added)

So to add some more information. It turns out the Android Studio IS making the correct version. However, my phone just isn't loading it from the APK. This is what I have done: I created a new version, 1.07, and with my phone plugged into my computer, it correctly runs this version on my phone, even when I unplug the phone and restart the newly installed app on the phone. I then navigated to the APK stored on our intranet (previously saved there as described earlier in this post), downloaded it and installed it on my phone. It has now reverted to v1.06 strangely. So on a different phone that had an older v1.04, I also downloaded the app from the intranet and installed it, and it showed v1.07. This shows that the APK WAS indeed correctly created. Then on a 3rd phone where the app was never previously installed, I installed it from the app, and it was v1.07. Again, correct version.

I then went to my 1st phone again, went into settings, went to the apps, and deleted the cache and data, then uninstalled it from my phone. I then went to downloads and APK's and deleted all previously downloads. So theoretically no trace should be left on my phone. I then again downloaded the APK, and it is again v1.06!!! I plug my phone into the PC (to use as the emulator) and it then correctly installs the correct v1.07 onto my phone.

What is happening...!!!? It is almost like it reverts to the previous v1.06 when I do a manually download and install of a v1.07 APK, but where is the v1.06 even coming from? Does the phone keep a history of the app versions?

Please help me make sense, and how to get it working. This app is for about 300 people in our company, hence me distributing the app over the intranet as a link.

来源:https://stackoverflow.com/questions/59176581/android-studio-generating-old-version-apk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!