GoogleChromeLabs / bubblewrap

Bubblewrap is a Command Line Interface (CLI) that helps developers to create a Project for an Android application that launches an existing Progressive Web App (PWAs) using a Trusted Web Activity.
Apache License 2.0
2.29k stars 152 forks source link

"An SDK version you are using has been reported as outdated" warning in Google Play Console #810

Closed david-buck closed 11 months ago

david-buck commented 1 year ago

I am getting this message in Google Play Console for two out of three of my apps created using Bubblewrap.

The SDK developer androidx.fragment has reported fragment:1.0.0 as outdated. Consider upgrading to a newer version.

image

Is there something I can do, or is it a case of waiting for an update to Bubblewrap/Android Browser Helper?

Thanks,

Bayernatoor commented 1 year ago

Yep I am getting the same. I assume Bubblewrap needs to update the SDK they are using.

andreban commented 1 year ago

Hum, Bubblewrap doesn't include this library directly, so I'm guessing it's a transitive dependency from https://github.com/GoogleChrome/android-browser-helper/. Are you using the location delegation or play billing features?

andreban commented 1 year ago

It seems the Play Service location library includes Play Services Base, which in turn includes AndroidX Fragments. So, the solution is to bump the version on android-browser-helper so it can also be bumped in Bubblewrap.

david-buck commented 1 year ago

Are you using the location delegation or play billing features?

Yes, the apps getting this warning use location delegation, the one not getting this warning does not.

Thanks

GCSBOSS commented 1 year ago

I'm getting this and I have no clue what location delegation even is.

andreban commented 1 year ago

@GCSBOSS Check your twa-manifest.json and the features section. If your web application doesn't use the Location API, you can probably disable it (and make your APK slightly smaller)

andreban commented 11 months ago

android-browser-helper has been updated to use a newer version of play-services-location: https://github.com/GoogleChrome/android-browser-helper/pull/437. One a new version of the library is published we can update Bubblewrap.

andreban commented 11 months ago

Deployed on Bubblewrap 1.21.0

david-buck commented 11 months ago

This may be a stilly question, so please forgive me but, how does this not require a version bump in ABH?

andreban commented 11 months ago

The library causing the warning is included via the locationdelegation part of ABH, which was updated via #819. There's no need to update the core library

david-buck commented 11 months ago

I have reinstalled @bubblewrap/cli to get the latest version and am still getting this error in Play Store Connect:

image

bubblewrap --version is returning version 1.21.0

Do I need to reenable alphaDependencies or something?

andreban commented 11 months ago

Did you run bubblewrap update after updating to the last version and before rebuilding the APK?

david-buck commented 11 months ago

Yes I did

mghatiya commented 11 months ago

I am getting this error too and I have very little knowledge of how all these codes work. I had somehow managed to get bubblewrap setup for my app.

Hope one of you would be able to guide what exactly I need to do in my app to get this problem fixed.

mghatiya commented 11 months ago

@david-buck did your issue get resolved? This thread seems to be in "closed" status. I wonder if anyone will look at it now.

david-buck commented 11 months ago

@mghatiya no it didn't. I'm not sure what the next move is tbh. I opened the project in Android Studio and the correct dependency versions are showing in the gradle file, so I can't be sure if it's not just a classic Play Store issue.

andreban commented 11 months ago

There may be another library being pulled in that Play is alerting about.

david-buck commented 11 months ago

This is the specific warning in Play

image

I did an update and build to generate the version for this screenshot.

DoyinDimeji commented 8 months ago

Hey @david-buck, did you manage to get this resolved? I am also on version 1.21.0 with the same warning popping up in Play console.

david-buck commented 8 months ago

No, I gave up. There's no obvious reason why bubblewrap is building with the wrong version.

mghatiya commented 8 months ago

How do we bring people's attention to it? @david-buck maybe you can reopen the thread?

david-buck commented 5 months ago

I found some time to dig into this a bit more and I can't work out how the fix mentioned above was meant to solve it.

I cleared all gradle caches on my computer, cleared NPM caches, installed the latest JDK update, and reinstalled bubblewrap before looking into this.

By running a gradlew app:dependencies on the output of my bubblewrap build I see that theandroidx.fragment:fragment:1.0.0 dependency is being used by:

com.google.android.gms:play-services-base:18.1.0 which is a transitive dependency brought in by com.google.android.gms:play-services-location:21.0.1. and com.google.android.gms:play-services-basement:18.1.0 which is also a transitive dependency of com.google.android.gms:play-services-location:21.0.1. which was the change in ABH made here

So my projects are using the right versions of play-services-base from ABH, but the dependencies are still not good.

My only hope is that the newer version of play-services-base (18.3.0) or com.google.android.gms:play-services-location (21.1.0) fixes this.

Please, @andreban , could you revisit this?

david-buck commented 5 months ago

In answer to this, it looks like Google's official packages are reliant on the outdated version https://mvnrepository.com/artifact/com.google.android.gms/play-services-base/18.3.0

image

I think we just have to ignore it until the deprecated version is updated in every upstream dependency.