Recent

Author Topic: New Android App Bundle and target API level requirements in 2021  (Read 1942 times)

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
New Android App Bundle and target API level requirements in 2021
19 November 2020

Posted by Hoi Lam, Developer Relations Engineer, Android Platform

Android app bundle image

In 2021, we are continuing with our annual target API level update, requiring new apps to target API level 30 (Android 11) in August and in November for all app updates. In addition, as announced earlier this year, Google Play will require new apps to use the Android App Bundle publishing format. This brings the benefits of smaller apps and simpler releases to more users and developers and supports ongoing investment in advanced distribution.

Over 750,000 apps and games already publish to production on Google Play using app bundles. Top apps switching save an average size of 15% versus a universal APK. Users benefit from smaller downloads and developers like Netflix and Riafy see higher install success rates, which is especially impactful in regions with more entry level devices and slower data speeds. Developers switching can use advanced distribution features such as Play Asset Delivery and Play Feature Delivery. We value your feedback and plan to introduce further features and options for Play App Signing and Android App Bundles before the switchover.

More information:
https://android-developers.googleblog.com/2020/11/new-android-app-bundle-and-target-api.html

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Re: New Android App Bundle and target API level requirements in 2021
« Reply #1 on: November 27, 2020, 11:44:27 am »
Creating an App Bundle is quite simple we will only have to create this "gradle-local-build-bundle.bat":

Code: Pascal  [Select][+][-]
  1. set Path=%PATH%;c:\laztoapk\downloads\android-sdk-windows\platform-tools
  2. set GRADLE_HOME=c:\laztoapk\downloads\gradle-6.6.1\
  3. set PATH=%PATH%;%GRADLE_HOME%\bin
  4. gradle clean bundle --info
  5.  

If we want it to be signed to be able to upload it to Google Play, the easiest thing is to add the following to build.Gradle, which will also help us to automatically sign the Apk:

Code: Java  [Select][+][-]
  1.     ...
  2.     defaultConfig { ... }
  3.  
  4.     signingConfigs {
  5.         release {
  6.             // You need to specify either an absolute path or include the
  7.             // keystore file in the same directory as the build.gradle file.
  8.             storeFile file("myapp.keystore")
  9.             storePassword "mystorepassword"
  10.             keyAlias "mykey-alias"
  11.             keyPassword "mykeypassword"
  12.         }
  13.     }
  14.  
  15.     buildTypes {
  16.         release {
  17.             signingConfig signingConfigs.release            
  18.         }
  19.     }
  20.  

Tested in my shopping list app:
https://play.google.com/store/apps/details?id=tr3e.MarkListFree
« Last Edit: November 27, 2020, 04:20:49 pm by ADiV »

Segator

  • Full Member
  • ***
  • Posts: 168
    • https://github.com/Nenirey
Re: New Android App Bundle and target API level requirements in 2021
« Reply #2 on: November 27, 2020, 01:28:32 pm »
I use the sign script like that because i can't create a google development account ( i am cuban), but this need integrate to the smartdedisign code because it delete it from build.gradle constantly, about the API 30 i download the Android R things and i can select the API 30 target, only up to 29 i can select.
« Last Edit: November 27, 2020, 01:30:12 pm by Segator »
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Re: New Android App Bundle and target API level requirements in 2021
« Reply #3 on: November 27, 2020, 02:47:58 pm »
I use the sign script like that because i can't create a google development account ( i am cuban), but this need integrate to the smartdedisign code because it delete it from build.gradle constantly, about the API 30 i download the Android R things and i can select the API 30 target, only up to 29 i can select.

The API 30 is not yet available but the App Bundle is, it can also be generated without signing, but if you do not use Google Play, none of the above is necessary.

Segator

  • Full Member
  • ***
  • Posts: 168
    • https://github.com/Nenirey
Re: New Android App Bundle and target API level requirements in 2021
« Reply #4 on: November 27, 2020, 06:35:33 pm »
Quote
The API 30 is not yet available but the App Bundle is, it can also be generated without signing, but if you do not use Google Play, none of the above is necessary.
but i hope that i can use Google play in the future  :)

ADiV share the optimization script a gain you not give time to copy it  ;)
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Re: New Android App Bundle and target API level requirements in 2021
« Reply #5 on: November 28, 2020, 07:38:34 pm »
Quote
The API 30 is not yet available but the App Bundle is, it can also be generated without signing, but if you do not use Google Play, none of the above is necessary.
but i hope that i can use Google play in the future  :)

ADiV share the optimization script a gain you not give time to copy it  ;)

The code obfuscation script does not work for LAMW as it changes the names of Java functions and the native code cannot bind.

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Re: New Android App Bundle and target API level requirements in 2021
« Reply #6 on: December 03, 2020, 07:28:58 pm »
With the latest LAMW update we can sign our apk or bundle more easily:

First we will execute "release-keystore" if we do not have the signature created.

Then we will fill in the signature file "gradle.properties" as follows:
Code: Pascal  [Select][+][-]
  1. RELEASE_STORE_FILE = yourapp.keystore
  2. RELEASE_STORE_PASSWORD = yourpassword
  3. RELEASE_KEY_ALIAS = yourappaliaskey
  4. RELEASE_KEY_PASSWORD = yourpassword

And to finish we close and open the project and it will automatically include the signature.

Segator

  • Full Member
  • ***
  • Posts: 168
    • https://github.com/Nenirey
Re: New Android App Bundle and target API level requirements in 2021
« Reply #7 on: December 03, 2020, 07:44:47 pm »
That is a great news!!!
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: New Android App Bundle and target API level requirements in 2021
« Reply #8 on: December 03, 2020, 08:59:18 pm »

Added new "Docs" to LAMW github

"How to Sign apk or bundle using gradle by ADiV.txt"

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018