Checklist for Building Google Play Store App using Unity
This post is going to be a checklist of things that need to configured in Unity before building and uploading the app to Google Play Store.
1. Google play store 64 bit requirements.
Google play store enforces to have only 64 bit configurations as only 0.14% of the android devices need 32 bit requirement. This can be easily done in Unity through the following.
Go to "File" menu and choose "Build Settings" or press Ctrl+Shift+B (shortcut) to open "Build Settings".
You can choose to build ".apk" files to publish but Google now has ".aab" files option also, so check "Build App Bundle (Google Play)" checkbox if you want.
Now choose the "Player Settings" Option at the left bottom cornor of the "Build Settings" Window.
Go to "Other Settings"
Go to "Configurations" and then set "Scripting Backend" to "IL2CPP" and under "Target Architecture" check both the "ARMv7" and "ARM64" checkboxes.
2.1 Checking and updating the tools
Before going through the below steps to update the Android SDK, check if (link)current target API Level matches that of your Unity project in the "Player Settings -> Other Settings -> Identification -> Target API Level" and check if the highest API installed is same.
If it matches then skip the below steps and go to step 3 directly.
If it doesn't match then update the Android SDK tools by following one of the two following methods.
2.2 Update using Android Studio (Recommended)
If you install android studio now, it should automatically install the latest SDK tools but anyway goto "File" menu.
Goto the "Settings" under "File" menu and it should open the "Settings" window and Choose the appropriate API level required.
Goto the "SDK Tools" window and Click the show packages checkbox. Before you install "NDK" check the Unity version you have and install the appropriate NDK version required.
Goto the "SDK Tools" window and Click the show packages checkbox. Install the appropriate SDK version required.
2.3 Update using Command Line Tools
Download the zip file and extract it to this specific location "C:\Users\%USERNAME%\AppData\Local\Android\sdk\" (Create this location and extract it) and Goto "bin" driectory.
Open the command prompt as it is where the "sdkmanager" is located and type sdkmanager --list. It will show the list of installed and available components to install.
Now install or update the sdkmanager components using sdkmanager "component;version" like sdkmanager "build-tools;30.0.2" "platforms;android-29". The component and version can be got from the sdkmanager --list command. Be sure to install the apprpriate SDK version for target API level of Google and NDK version for Unity.
This error may occur and also possible solution for it is below.
3. Signing the app
The following is to create custom keystore and using it to sign the app.
Go to "File" menu and choose "Build Settings" or press Ctrl+Shift+B (shortcut) to open "Build Settings", then go to "Player Settings", find "Publishing Settings" and click "Keystore Manager".
Now Keystore Manager Window should open, here choose the top left dropdown and create new (custom) keystore by filling the details and passwords.(Note : These passwords are important)
After filling the details Unity will ask you, if you choose the newly created keystore to sign the app, give "yes".
Now, this is how the assigned custom keystore should look like, the difference wuld be your keystore name should be present instead of "dummy".
Now build in Unity and upload it to Google Play Store.
If you want to give some feedback or add some missing points, let me know