Android attachment of old (cached) wear apk in mobile apk release

I create a signed apk using the Build option → Generate Signed APK

Problem - mobile-release.apk does not insert updated apk wear. I tried changing the text / logic, but it always displays the old thing.

I tried all of the following, any ideas why it continues to build in the old wear apk instead of creating a new one.

  • File -> Invalid Cache / Restart.
  • Assembly → Project cleaning + rebuilding
  • Clear phone caching app
  • Settings → Resynchronization of all applications (option in the manual application)
  • manually delete all apks in the build folder of both mobile and mobile phones.

Any clues or anyone who encounters a similar problem, answer.

Update 1:

I tested the generated wear-release.apk media separately, its last, somehow built-in apk is deprecated.

I changed my gradle configurator to manually enable the 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. 

it really gives an error if wear-release11.apk is missing . But when wear-release11.apk is available , it still inserts some old cached apk.

Update 2: I extracted and checked the contents of the generated APK, it really has the last generated apk inside it. But somehow the phone presses the cached version. Not sure if his companion app for Android and the Play Store app caused this error. For me, uninstall the application for the companion android (surprisingly, and not just to clear the data) to solve this problem. But after a while it will cache apk.

+5
source share
1 answer

I saw a situation some time ago when a wearable application got stuck and did not update. I think the error was resolved, but I wanted to put this response on the record just in case, if this is still happening.

If you are 100% sure that your APK is configured correctly, you can try this procedure, which should always fix it. If this is not fixed, then there is a problem with the build process of the APK:

  • Factory reset clock: Settings ... reset device
  • On your phone: Settings ... Applications ... Google Play Services.
  • Click "Clear Cache"
  • Click Space Management
  • Managing wearable media ... Clear now
  • General data used by Google Play services ... Clear all data
  • Reboot the phone.
  • Try connecting the phone to the watch again.
+3
source

Source: https://habr.com/ru/post/1202270/


All Articles