Introduction
Updating and maintaining old projects is always a challenge, and that’s what I’ll be sharing today. I had the chance to work on Alama bel Qalam, a valuable but fairly old project originally developed by another fellow developer. My role was to maintain and extend it with new features, but since the project was several years old, I soon began to run into problems.
In this post, I’ll walk you through the issues I faced, how I tried to salvage the project, and what I learned in the process.
The Challenge
Let me introduce Alama Bel Qalam, a valuable and helpful project that I had the pleasure of working on. The project was originally created by a fellow developer, and my role was to update it with new features and maintain it over time.
The problem was that this project was developed quite a while ago, back when Unity’s capabilities were not as advanced. As a result, the developer had to rely heavily on a few plugins, some of which were tightly integrated into the entire project. Fast forward a couple of years, Unity introduced those long-awaited features, which made the plugins redundant. Naturally, the plugin creators decided it wasn’t worth maintaining them anymore, so they marked them as obsolete and stopped supporting them. This meant that, eventually, projects depending on those plugins would start to malfunction.
Today, I want to share the process I went through to try to salvage this project: the issues I faced and how I fixed them. It’s important to mention that my solution wasn’t permanent. In the end, I couldn’t keep the project alive because Google Play requires developers to regularly update the API level, and this project wasn’t sustainable under those conditions. Still, the fixes worked at the time, and I believe that for other projects where the plugins weren’t so tightly integrated, this approach could have extended their lifespan much longer. Unfortunately, I wasn’t that lucky 🙂
And one more note before diving in: I develop solely on Linux, so some of the points I’ll mention will only apply to Linux users, or may require different solutions on Windows or Mac.
Opening old Unity version (2018.4.14) issue
- This is the page for Unity versions (including archived ones): https://unity.com/releases/editor/archive
- Hub wasn’t able to open the old project and couldn’t create a new 2018 project, and so I tried to run Unity 2018 from the terminal and it showed missing a certain library file, which I then installed using “sudo apt install libgconf-2-4”. Details here: https://forum.unity.com/threads/ubuntu-18-04-unity-2018-2-0f2-error-while-loading-shared-libraries.540077/
- I can find the Unity editor’s install location from the Unity Hub install tab
- This helped me to run Unity through the terminal”./Unity” https://unitycoder.com/blog/2017/05/19/install-run-unity-in-linux-terminal/
Changing API level to the current highest (33)
This issue is regarding Google’s new policy that makes it mandatory for developers to update their apps to be a maximum of two API levels away from the newest API level https://stackoverflow.com/questions/75515890/this-app-isnt-available-for-your-device-because-it-was-made-for-an-older-versio
https://developer.android.com/google/play/requirements/target-sdk
- To solve this issue, I needed to open build settings (Android) and set Target API to 33, but I needed to install the SDK first. I tried to use the command line to do that, but it didn’t work, and the easiest alternative (after some searching ) was to download Android Studio using snap => update then sudo snap install android-studio –classic https://snapcraft.io/install/androidsdk/ubuntu
- Then I opened the SDK manager from Android Studio and let it download the latest API
- For some reason, the SDK was not detected inside Unity when I added it to preferences. So I had to follow the suggestions and uncheck “hide obsolete packages” and then check the “android obsolete packages” choice from above https://forum.unity.com/threads/unable-to-detect-sdk-in-the-selected-directory.850387/
- Now the new problem was that Unity still didn’t show higher than API 28 in the target API, but I found on this page that even if it is not listed, if I select to use the highest installed, it is still going to use the 33 one if it is installed (and if it is the highest installed) https://forum.unity.com/threads/which-unity-version-supports-min-17-max-30-api-level.1093402/
- But it seems the reason it wasn’t showing the option to select 33 was that it didn’t load the levels in the SDK folder, so closing Unity and opening it again fixed this issue, and now I can select API level 33
- I tried to change the scripting runtime version from 3.5 to 4, but after that, the API level wasn’t loading again, so just to avoid any possible issues, I reset it to 3.5
- Now I added the key and password and changed the version and attempted to build an AAB, but Unity said it didn’t detect the NDK, so I opened Android Studio and checked the NDK to download it.
- Trying to build again asked me to browse for NDK, and I have to choose the appropriate NDK version from inside “Android/SDK/ndk/”. Choosing the up-to-date version installed produced a prompt from Unity telling me that it requires version r16b
- I found I can download any version I want by showing package details from the SDK manager and selecting the version I want. https://developer.android.com/studio/projects/install-ndk
- Now the building process actually started, but finished with “Build completed with a result of ‘Succeeded’”, but no build file was found. Researching the issue showed that to be able to get an actual error, I need to attempt to build and run on a device. https://forum.unity.com/threads/build-completed-with-a-result-of-succeeded-but-no-build.881596/
- Attempting to build and run on a connected device (while enabling debugging and trusting the connected computer) produced an error that showed a missing library( libncurses.so.5). Below is the error log indicating the missing library. https://docs.google.com/document/d/1nWSBqbOkGDXbRVnEzX8mH3_ZDESesSCE7ey53hKCKL0/edit#
- Researching the error and the library name included showed that I needed to download this library (as the answer below describes). After installing the library, I was able to build both the APK and the AAB (for Google Play) files. https://stackoverflow.com/questions/17005654/error-while-loading-shared-libraries-libncurses-so-5
Note: I still can’t build and run on a device, and the error log above has the errors that appear when I attempt to do that, but since I can copy the APK to the device manually and test it, I decided to leave this for another day.
Publishing to Google Play
- Attempting to publish to Google Play required me to answer some prompts that had accumulated over the past years since the last release. I answered all and sent it for review, and the data safety one was rejected(invalid data safety form split_bundle 4). It gave examples of advertising ID, so I opened the project and removed the packages for advertising and analytics (which I wasn’t using) and rebuilt, and uploaded. I used this link to quickly remember how to upload a new release: https://support.google.com/googleplay/android-developer/answer/9859348?sjid=17511800181861709061-EU#create
- Now I still don’t know if the data safety issue is solved but I have to upload a build without the advertising and analytics packages in order to make sure that there is nothing violating data safety. Attempting to upload the build produced this error: “You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the ‘android:exported’ property set. This file can’t be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported”
- I found the solution is to add a line in the Android manifest file as explained here https://discussions.unity.com/t/you-uploaded-an-apk-or-android-app-bundle-which-has-an-activity-activity-alias-service-or-broadcast-receiver-with-intent-filter-but-without-android-exported-property-set/250141
- To be able to make this change, I had to put my own manifest file, which required two steps. First, check “custom Gradle template” in publish settings. This will create a plugins/Android/gradle file. After that, I had to fish out the manifest file that Unity uses and copy it to the same path. Now I can open the manifest file and paste the needed XML line. https://docs.unity3d.com/Manual/overriding-android-manifest.html https://www.youtube.com/watch?v=G4-bPjhe2A4
- That removed the error, but another one appeared because I forgot I needed to adjust the bundle version value, so I fixed that (along with the version value for my own tracking) and reuploaded. https://stackoverflow.com/questions/9720229/unity-3d-what-is-the-android-bundle-version-and-version-code-and-how-do-they-re
- Now no errors, so I sent for Google to approve the new release and hopefully resolve the data safety issue, which is still pending.
- Unfortunately, Google immediately replied with the same data safety error. After a lot of research turns out that in old Unity versions, Unity was sending some requests automatically. I used an app called Charles to track what my game was sending. These links describe the whole thing. https://forum.unity.com/threads/google-play-keeps-detecting-collection-of-personal-and-sensitive-information-rejecting-my-app.885223/ https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity https://www.charlesproxy.com/documentation/installation/apt-repository/
- This showed me that my app was actually communicating with these servers:
- https://config.uca.cloud.unity3d.com
- https://cdp.cloud.unity3d.com
- I wasn’t sure about the nature of the data being transmitted, but after more searching, it seems to be mostly device data. https://forum.unity.com/threads/which-data-does-unity-collect-automatically.615997/
- The only option for me then was to change my data safety answers, but thankfully, my privacy policy seems to already include all statements needed, so at least I won’t need to change that.
- I reviewed the data safety quiz again and checked that I am collecting data (Android ID or device ID), and checked collected and that it is encrypted and that it still complies with the family policy. Now I sent it for review along with the updated game version from before, and waiting again.
- IT WORKED 🙂 Passed the data safety and published the update, and it didn’t affect the family category.
- One small thing to check later is that now, when I search by the name without the accent, it doesn’t show, but when I choose the family category, it appears easily.
Final thoughts
Through this post, we explored the process of salvaging a large project that otherwise might have been decommissioned. I hope this was helpful to whoever is reading, and I’d be glad to hear your thoughts—especially if you have alternative solutions to any of the issues mentioned.
Thank you! 🙂
Share this:
- Click to share on X (Opens in new window) X
- Click to share on Facebook (Opens in new window) Facebook
- Click to share on LinkedIn (Opens in new window) LinkedIn
- Click to share on Reddit (Opens in new window) Reddit
- Click to share on Telegram (Opens in new window) Telegram
- Click to share on WhatsApp (Opens in new window) WhatsApp