overhangio / tutor-android

Building an Android application for your Open edX platform
GNU Affero General Public License v3.0
7 stars 10 forks source link

The android Docker image does not build on nightly #11

Closed muhammadali286 closed 5 months ago

muhammadali286 commented 6 months ago

Getting this error while building image with nightly.

This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered.

Screenshot 2023-11-07 at 6 45 46 PM
muhammadali286 commented 5 months ago

Hi, I am trying to install tutor android plugin with tutor nightly and currently facing two challenges.

  1. We do not mention build tools version in android app after Gradle 3 (Ref). Android build tasks are trying to install build tool 30.0.3 on Ubuntu image as build tool has not mentioned in edx android which has its own bug and can not be installed (issue details). Possible solutions are i. We can ask Edx mobile to to explicitly mention build tool version. ii. We can fork the the repo in which we can add the version. It is not recommended because we will have to manage the repo with latest code. iii. After cloning, script will edit the build.gradle file with adding build tool version. iv. We can try building image with other versions of OS. I have personally run all the commands on mac and its working fine on mac. android dependencies differ from one OS to other.

  2. We have two different services for android app i.e android and android-app while building image we can only build android one, but on launch command it is building android-app. I am unable to figure out the purpose of these images would appreciate if someone explain it to me.

regisb commented 5 months ago

Thanks for investigating this issue @muhammadali286.

We have two different services for android app i.e android and android-app while building image we can only build android one, but on launch command it is building android-app. I am unable to figure out the purpose of these images would appreciate if someone explain it to me.

The "android" image is the image that contains all the tools to later build the app. This image does not contain any user-specific configuration, and thus it is pushed to Docker Hub: https://hub.docker.com/r/overhangio/openedx-android

The "android-app" image, on the other hand, contains a lot of user-specific configuration, so we cannot push it to Docker Hub. We need to re-build it every time the configuration changes, which can be quite often.

We could bundle both build tools and application in a single image, but then the build time would be very long. So we put as much of the build steps as possible in the pre-built "android" image.