Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWA Builder]: Support for Android SDK 34 #4766

Open
kiajiko opened this issue Jul 4, 2024 · 33 comments
Open

[PWA Builder]: Support for Android SDK 34 #4766

kiajiko opened this issue Jul 4, 2024 · 33 comments
Assignees

Comments

@kiajiko
Copy link

kiajiko commented Jul 4, 2024

Tell us about your feature idea

Google again changed the API level requirements.
App must target Android 14 (API level 34) or higher starting from Aug 31, 2024

Current supported version is 33

bubblewrap does not seem to be updated so far, too.

Do you have an implementation or a solution in mind?

Download source code from pwabuilder.com and compile with new version.

Have you considered any alternatives?

No response

@jere-mie
Copy link

jere-mie commented Jul 5, 2024

Why put a start date of Aug 31, 2024 if they're going to start enforcing it sooner 😭 hopefully this gets fixed soon enough. My guess is it isn't an issue on PWABuilder's side, rather on Bubblewrap's side

@jonkerw85
Copy link

@jere-mie Yes, remarkable, I noticed that too. Maybe the different teams within Google are not aligned.
https://developer.android.com/google/play/requirements/target-sdk?authuser=2
image

@SheepBroadcast
Copy link

Same here

@userofit123
Copy link

Been having this for a few days also

@MrAntix
Copy link

MrAntix commented Jul 6, 2024

Please use the thumbs up on the original issue, don't "same here" the thumbs up will bring attention better and leave the issue readable down the line - thank you :)

@Twey
Copy link

Twey commented Jul 8, 2024

In the meantime you can work around this by changing the targetSdkVersion in the manifest manually. You'll need zip, protoc, bundletool, and a JDK (e.g. OpenJDK) for jarsigner.

  • unzip https://maven.google.com/com/android/tools/build/aapt2-proto/3.6.3-6040484/aapt2-proto-3.6.3-6040484.jar to the directory $AAPT_PROTO
  • unzip your PWABuilder-built AAB (unzip YourApp.aab) and cd base
  • decode the manifest: protoc -I $AAPT_PROTO Resources.proto --decode=aapt.pb.XmlNode <manifest/AndroidManifest.xml >manifest.txt
  • edit targetSdkVersion in the manifest.txt and change int_decimal_value: 33 to int_decimal_value: 34
  • reencode the manifest: protoc -I $AAPT_PROTO Resources.proto --encode=aapt.pb.XmlNode >manifest/AndroidManifest.xml <manifest.txt
  • zip up your base directory: zip -r base.zip *
  • use bundletool to bundle up the base module: bundletool build-bundle --modules base.zip --output your-app-signed.aab
  • use jarsigner to sign your new AAB: jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore signing.keystore your-app-signed.aab my-key-alias (enter the keystore password and key password from signing-key-info.txt when asked)
  • submit your-app-signed.aab to the Play store

@maiconcarraro
Copy link

^ There is also another easy workaround if you can use Android Studio, you can select to include Source code while generating the Android package on PWABuilder, so you can open the project and update the compilesdk/targetsdk, and build/sign again.

@jgw96
Copy link
Contributor

jgw96 commented Jul 8, 2024

Hello all! Sorry for the delay, I was on holiday for July 4th here in the US. I am working with our team to get Bubblewrap + PWABuilder updated and will post here when things are updated. Both @Twey and @maiconcarraro 's workarounds are great. Using Android Studio is what I would recommend for now if you are blocked.

@jgw96
Copy link
Contributor

jgw96 commented Jul 8, 2024

And this is the issue to get Bubblewrap updated GoogleChromeLabs/bubblewrap#860

@jonkerw85
Copy link

jonkerw85 commented Jul 9, 2024

@jgw96 and @maiconcarraro

After changing the compile and target SDK in the build.gradle file, some warnings are shown when compiling the project.
image

@kiajiko
Copy link
Author

kiajiko commented Jul 9, 2024

@jonkerw85
I was able to update it using Android Studio Koala | 2024.1.1, then installed Gradle version 8.7 in studio, after that updated Gradle plugin to 8.5 version in studio, which supports SDK 34. Then installed SDK 34 in studio. Then changed target sdk, compile sdk to 34 version.
Compilation returned only two unimportant warnings. Easily fixed one of them (it was clear what to change, but unfortunately do not remember what was that about), the second one was related to some deprecated function in 9.0 version.
Then Generated signed aab/apk in studio without issues. New version of my app passed google validation and update is already available in Google Play Store.

@jonkerw85
Copy link

@kiajiko Thanks for the support. Upgrading the Gradle version indeed resolves the warnings.

@joyzhong
Copy link

joyzhong commented Jul 9, 2024

Just fyi, there's another update needed for PWA's that enable Play Billing. I believe the android-browser-helper billing library version that PWABuilder points to would need to be updated (after the library itself is updated to support Play Billing 7.0), see also GoogleChrome/android-browser-helper#473

@jgw96 jgw96 self-assigned this Jul 9, 2024
@jgw96 jgw96 pinned this issue Jul 9, 2024
@murali0101
Copy link

Hi @jgw96 waiting for your update about [SDK 34]

@cactusoft
Copy link

If Google are going to do things like this, it would be useful if PWA Builder included a field where we could override defaults, maybe an optional field that could show json for the defaults which would then let you override them if you want.

@Zimasl
Copy link

Zimasl commented Jul 11, 2024

Hi @jgw96

We are waiting for updates about [SDK 34]

@lawtonj404
Copy link

@jonkerw85 I was able to update it using Android Studio Koala | 2024.1.1, then installed Gradle version 8.7 in studio, after that updated Gradle plugin to 8.5 version in studio, which supports SDK 34. Then installed SDK 34 in studio. Then changed target sdk, compile sdk to 34 version. Compilation returned only two unimportant warnings. Easily fixed one of them (it was clear what to change, but unfortunately do not remember what was that about), the second one was related to some deprecated function in 9.0 version. Then Generated signed aab/apk in studio without issues. New version of my app passed google validation and update is already available in Google Play Store.

Any chance you can do a quick youtube guide on how to do this? I'm new to Android studio and worried about the deadline.

Your help is much appreciated

@Zimasl
Copy link

Zimasl commented Jul 16, 2024

Why it takes so long to solve the problem on PWA Builder with SDK 34 is not a serious approach to users who trust you.

@jere-mie
Copy link

@Zimasl pwabuilder is built on top of bubblewrap, and that's where the update needs to be made. It isn't something pwabuilder can immediately fix. Several users have mentioned alternative solutions you can try out in the meantime

@maiconcarraro
Copy link

@lawtonj404

Any chance you can do a quick youtube guide on how to do this? I'm new to Android studio and worried about the deadline.

Your help is much appreciated

let me know if you need something different: https://youtu.be/DbarW15E058

@Aviv1000
Copy link

@lawtonj404

Any chance you can do a quick youtube guide on how to do this? I'm new to Android studio and worried about the deadline.
Your help is much appreciated

let me know if you need something different: https://youtu.be/DbarW15E058

i get error after click on "upgrade to grandle 8.5 and re-sync":

Could not create task ':app:processDebugResources'.
Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.

* Try:
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.

and i dont see "change grande version ... and re-import project"

what to do?

@sebastian-raubach
Copy link

sebastian-raubach commented Jul 16, 2024

@Aviv1000 I had the same issue. Make sure to update the gradle version as shown in step 8 in the video to 8.5.1. You'll have to edit the file build.gradle (Project: source).

@maiconcarraro
Copy link

@Aviv1000 I had the same issue. Make sure to update the gradle version as shown in step 8 in the video to 8.5.1. You'll have to edit the file build.gradle (Project: source).

sorry for missing this, maybe because I already did earlier it skipped a step, happy that you managed to figure out.

@Aviv1000
Copy link

yes its work, but still exists some troubles with google play console, its say:

  1. androidx.fragment:fragment (androidx.fragment:fragment) need be at least version 1.1.0+ insted of 1.0.0
  2. pay library - version 5.2.1 too old, must to be version 6.0.1+

As a web developer I have no idea what all of thats means.

@drma-tech
Copy link

isnt better to ask bubblewrap to update the sdk version?

@maiconcarraro
Copy link

@Aviv1000 if you have the Android Studio working like in the vídeo you can google these other upgrades like they do for native app

@drma-tech there is an open PR already in their repo for this

@AaronLayton
Copy link

It looks like there is a PR already open on Bubblewrap to fix this, it just needs testing GoogleChromeLabs/bubblewrap#860

@lawtonj404
Copy link

lawtonj404 commented Jul 16, 2024

@maiconcarraro

Any chance you can do a quick youtube guide on how to do this? I'm new to Android studio and worried about the deadline.
Your help is much appreciated

let me know if you need something different: https://youtu.be/DbarW15E058

You are amazing! thank you so much, its uploaded to google and awaiting verification / deployment. I really appreciate you taking the time to help a fellow user.

@lawtonj404
Copy link

@maiconcarraro

Thank you so much, you are amazing, I followed the step by step guide and resolved the two errors easily. My app is now exported and in submission to the Play Store.

HERO!

@Aviv1000
Copy link

@Aviv1000 if you have the Android Studio working like in the vídeo you can google these other upgrades like they do for native app

@drma-tech there is an open PR already in their repo for this

im not sure what exactly i need to modifiy there in the grandle file:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.fragment:fragment:1.8.1'
    implementation 'com.google.android.play:billing:6.0.1'
    implementation 'com.google.androidbrowserhelper:locationdelegation:1.1.1'
    implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0'
}

this should works?
billing library can integrate like the old part of 'androidbrowserhelper'?

@arladmin
Copy link

With regards to the lack of appropriate fix/alternative solution/support in light of this fiasco:

Isn't the very point of this tool 'PWABuilder' to abstract away, pretty much, all of the underlying technicalities (including nested dependencies), and without having to know anything of/use Native IDEs (Android Studio etc.)?

Putting it bluntly, asking users to resort to manual interventions in native IDEs, by the 'PWABuilder' team (a Microsoft based entity), doesn't really cut it now, does it?

@Zimasl
Copy link

Zimasl commented Jul 17, 2024

@lawtonj404

Any chance you can do a quick youtube guide on how to do this? I'm new to Android studio and worried about the deadline.
Your help is much appreciated

let me know if you need something different: https://youtu.be/DbarW15E058

Thank you very much. Everything was done according to your instructions. My app is now exported and in submission to the Play Store.

@maiconcarraro
Copy link

maiconcarraro commented Jul 17, 2024

With regards to the lack of appropriate fix/alternative solution/support in light of this fiasco:

Isn't the very point of this tool 'PWABuilder' to abstract away, pretty much, all of the underlying technicalities (including nested dependencies), and without having to know anything of/use Native IDEs (Android Studio etc.)?

Putting it bluntly, asking users to resort to manual interventions in native IDEs, by the 'PWABuilder' team (a Microsoft based entity), doesn't really cut it now, does it?

@arladmin you should move your comment to bubblewrapper repo, the point of PWABuilder is still the same, and they are not asking manual interventions as the final solution... only if you are really blocked and need it asap, people are just sharing workarounds until it is fixed, you can do manual interventions if you want to fix before the Google team on bubblewrapper repo.

your comment is the kind of fiasco that ruins opensource communities, if you can't understand how dependencies work you can't blame others for your lacking of knowledge. peace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests