Android的磨损嵌入旧(缓存)移动释放的apk穿的apk磨损、缓存、Android、apk

2023-09-05 07:54:45 作者:ゞ寶貝`

我生成签名的APK使用选项生成 - >生成签名APK

I am generating the signed apk using the option Build -> Generate Signed APK

问题是移动release.apk没有嵌入更新磨损的apk。我试图改变文/逻辑,但它总是显示旧事。

Problem is mobile-release.apk doesn't embed the updated wear apk. I have tried changing text / logic, but it always display the old thing.

我已经尝试了所有的下面,任何想法,为什么它保持嵌入老戴的apk,而不是创建新的。

I have tried all of the following, any ideas why it keep embedding the old wear apk instead of creating the new one.

文件 - >无效缓存/重启 构建 - >清洁+重建项目 的磨损应用在手机上清除缓存 设置 - >重新同步所有的应用程序(手持磨损应用程序选项) 在手动删除所有的apk两个移动的生成文件夹和磨损移动。

任何提示,或其他人面临同样的问题,请回复。

Any hints, or anybody facing similar issue, please reply.

更新1:

我测试生成的耐磨release.apk 的独立,它的最新的,还是以某种方式嵌入APK是老了。

I tested the generated wear-release.apk separately, its the latest, still somehow the embedded apk is old.

我改变了我的摇篮配置手动包括新生成的APK,

I changed my gradle config to manually include newly generated apk,

compile fileTree(dir: 'libs', include: ['*.jar'])
// wearApp project(':wear')
wearApp files('wear-release11.apk') // renamed purposefully to make sure its picking right file.

这的确给错误,如果耐磨release11.apk 丢失..但是当耐磨release11.apk 可用,它仍然嵌入一些老缓存的APK。

it indeed give error if wear-release11.apk is missing.. but when the wear-release11.apk is available, it still embed some old cached apk.

更新2: 我提取并检查产生的APK的内容,它确实有它里面的最新生成的apk。但不知何故,手机推送缓存版本。不知道它的'机器人磨损配套应用或Play商店应用造成这个错误。 对于我卸载了android磨损配套应用(奇怪的是,不只是清除数据)解决了这个问题。但它会在一段时间后再次缓存的apk。

Update 2: I extracted and inspected the contents of generated APK, it indeed has the latest generated apk inside it. But somehow, the phone push cached version. Not sure if its 'android-wear' companion app or the Play Store app causing this bug. For me uninstalling the android-wear companion app (surprisingly, not just clearing data) solve this issue. But it will cache the apk again after some time.

推荐答案

我看到的情况前一段时间,其中的可穿戴式应用程序将被卡住,不会更新。我觉得这个bug已经解决了,但我希望把这个答案倒备案以防万一它仍然发生。

I have seen a situation a while ago where the wearable app would get stuck and would not update. I think the bug has been resolved, but I wanted to put this answer down for the record just in case it is still happening.

如果你是100%确保您的APK正确版本,那么你可以尝试此过程应该始终修复它。如果不能解决问题,则可能是您的APK构建过程中的问题:

If you are 100% sure your APK is versioned properly, then you can try this procedure which should always fix it up. If this does not fix it, then there is a problem with your APK build process:

恢复出厂设置手表:设置重置设备 在您的电话:设置...应用...谷歌播放服务 点击明确缓存 点击上管理空间 管理穿戴式存储......现在清除 在使用谷歌Play业务的总数据清空所有数据 重新启动手机 尝试配对的手机与手表再次