pwa-builder / CloudAPK

Build Android APK packages on the cloud
Other
147 stars 44 forks source link

Output App Bundles instead of APKs #23

Closed knurillaev closed 4 years ago

knurillaev commented 4 years ago

what to do problems with downloading an unrecognized APK file to google play Warning

This APK file contains unused resources and code that end up with users. You can reduce the size of the app using the Android App Bundle. Because you haven't optimized the app for different device configurations, users have to download and install more data. Large apps take up a lot of space on your devices, and users install them less frequently.

Decision

Use the Android App Bundle to automatically optimize the app for different device configurations, or manage optimization yourself with multiple APK files.

ghost commented 4 years ago

Hello knurillaev, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will investigate the issue and help solve it ASAP. Other community members may also look into the issue and provide feedback 🙌

andreban commented 4 years ago

Hi @knurillaev,

This is related to this Bubblewrap issue: https://github.com/GoogleChromeLabs/bubblewrap/issues/119

AppBundles helps breaking App content into smaller packages and ensures that only what is needed on each device is downloaded. But the generated project is already minimal and it's unlikely that App Bundles will generate benefits for apps generated via Bubblewrap / PWABuilder.

Nevertheless, we plan on outputting App Bundles to help avoiding the Play Store warning.

andreban commented 4 years ago

@jgw96 @knurillaev it might be worth changing the name of the issue to "Output App Bundles insteads of APKs" or something similar.

JudahGabriel commented 4 years ago

Sounds good. @andreban let us know when bubblewrap supports App Bundles, we'll do any necessary updates on our end.

knurillaev commented 4 years ago

@andreban how can I transform if the pwabuilder site doesn't provide the source code for performing the actions you said

mthlongwane commented 4 years ago

Hi I am also stuck here and am unable to release the beta version of my app. Was anyone able to solve it? Would really appreciate any help! image

JudahGabriel commented 4 years ago

@mthlongwane You can dismiss that warning; your PWA app will still be published. The Bubblewrap team hasn't migrated to App Bundles yet, so this warning comes with the territory for now.

andreban commented 4 years ago

We have introduced support for App Bundles on Bubblewrap 1.5.0 (changelog).

This is how the Bubblewrap CLI uses it:

  async buildAppBundle(signingKey: SigningKeyInfo, passwords: SigningKeyPasswords): Promise<void> {
    await this.gradleWrapper.bundleRelease();
    const inputFile = 'app/build/outputs/bundle/release/app-release.aab';
    const outputFile = './app-release-bundle.aab';
    await this.jarSigner.sign(
        signingKey, passwords.keystorePassword, passwords.keyPassword, inputFile, outputFile);
    this.prompt.printMessage(messages.messageAppBundleSuccess(outputFile));
  }
JudahGabriel commented 4 years ago

Thanks, @andreban. Do these .aab files work just like .apk files - can I open them on an Android device to install them, or drag and drop an .aab file on an Android emulator to install it?

andreban commented 4 years ago

They don't - you'd have to use bundletool to transform into an APK: https://developer.android.com/studio/command-line/bundletool

What we're doing in the Bubblewrap CLI is to build both formats - APK can be side-loaded to the phone (and installed via bubblewrap install while the .aab can be uploaded to Play.

JudahGabriel commented 4 years ago

Thanks. I'll talk to the team about generating both the APK and the .aab files.

santiq commented 4 years ago

I'm facing the same issue as @mthlongwane I dismissed the warning, but my app is not publishing, what can I do about it?

andreban commented 4 years ago

@santiq approval may take a while. What the Play Store shows is just a warning and won't block publishing.

santiq commented 4 years ago

@andreban Nope, I can't click the publish button.

This is an internal release for testing btw

Screen Shot 2020-07-27 at 18 42 19

andreban commented 4 years ago

@santiq what does the warning message under "View warning message" say?

santiq commented 4 years ago

@andreban Same as @mthlongwane

Screen Shot 2020-07-28 at 11 54 21

Conmariin commented 4 years ago

Same here. Obviously it's not an option anymore! After closing this message the Publish-Button is still greyed out. AAB seems to be mandatory.

santiq commented 4 years ago

@Conmariin check this out https://stackoverflow.com/questions/42925447/start-rollout-to-beta-disabled-in-play-store-developer-console

Conmariin commented 4 years ago

@santiq Thanks! That was it! Everything works also fine with normal APK's. My fault!

JudahGabriel commented 4 years ago

Implemented. We now generate both .apk (for testing) and .aab (for submitting to Store). We've updated our documentation accordingly.