Closed clorl closed 2 years ago
This is due to the changes in android exporting introduces in the latest Godot versions. Basically following lines need to be added to the Dockerfile:
RUN sudo apt install android-sdk
RUN sdkmanager --sdk_root="/usr/lib/android-sdk" "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529"
RUN echo 'export/android/android_sdk_path = "/usr/lib/android-sdk"' >> ~/.config/godot/editor_settings-3.tres
Similarly, there are several obsolete lines that can be deleted pertaining to removed editor settings. @abarichello @asheraryam
I'm not sure how to reproduce this error. Just tested the android APK output from the 3.3.3 version and it works perfectly. https://gitlab.com/barichello/godot-ci/-/jobs/1517625863
Not sure how it is working in your case.. I'll have to check for differences. But in my case I do get this error:
And it was working in older versions of Godot (before 3.3.2). I'll try to figure what is going on here...
@abarichello the job that you linked is running on Godot 3.2.3:
That's why it is working in your case 😄
The Godot version needs to be updated in that project's YAML: https://gitlab.com/barichello/godot-ci/-/blob/master/.gitlab-ci.yml ALSO this needs to be updated in the github YAML as well: https://github.com/abarichello/godot-ci/blob/master/.github/workflows/godot-ci.yml
In both cases the Godot version is still set at 3.2.3 there.
Lol, you're right. I'll test your changes then
@2shady4u I just created a test
tag with your changes, now I'm having an apksigner path error that I can't find a solution for 🤔
https://github.com/abarichello/godot-ci/tree/test
https://gitlab.com/barichello/godot-ci/-/jobs/1656163512
I also couldn't find the obsolete lines you mentioned.
@abarichello doing some testing myself https://github.com/2shady4u/godot-ci/tree/fix-android-export
I don't know if it works yet since new Docker doesn't allow me to auto-build from repo anymore :/ But to answer your questions:
RUN sdkmanager ...
command (see above) which seemed to be missingRUN echo 'export/android/adb = "/usr/bin/adb"' >> ~/.config/godot/editor_settings-3.tres
RUN echo 'export/android/jarsigner = "/usr/bin/jarsigner"' >> ~/.config/godot/editor_settings-3.tres
RUN echo 'export/android/timestamping_authority_url = ""' >> ~/.config/godot/editor_settings-3.tres
Thus they can be removed.
Hey, there is one more issue. Latest android-sdk doesn't include sdkmanager, so I figured out it to work with something like that before calling sdkmanager:
ENV ANDROID_HOME="/usr/lib/android-sdk"
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
RUN unzip commandlinetools-linux-*_latest.zip -d cmdline-tools
RUN mv cmdline-tools $ANDROID_HOME/
ENV PATH="${ANDROID_HOME}/cmdline-tools/cmdline-tools/bin:${PATH}"
@maxim-sheronov PR is welcome if you want to contribute the fix!
@maxim-sheronov PR is welcome if you want to contribute the fix!
Well, I made it working in custom image, so I probably can prepare a PR to make it available for people.
I'm getting this error for the mono-3.4.2 image... Not sure if I should open it as a new issue or what? Exact failure message:
ERROR: Cannot export project with preset "Android" due to configuration errors:
Debug keystore not configured in the Editor Settings nor in the preset.
A valid Android SDK path is required in Editor Settings.
at: _fs_changed (editor/editor_node.cpp:778)
ERROR: Project export failed with error code 3 for preset "Android".
at: _fs_changed (editor/editor_node.cpp:801)
I also tried adding
echo $ANDROID_HOME
cat ~/.config/godot/editor_settings-3.tres
to the script for the build but got back:
$ echo $ANDROID_HOME
$ cat ~/.config/godot/editor_settings-3.tres
cat: /root/.config/godot/editor_settings-3.tres: No such file or directory
and it failed directly after that on that run.
Header from my pipeline log:
Running with gitlab-runner 14.8.0~beta.44.g57df0d52 (57df0d52)
on blue-2.shared.runners-manager.gitlab.com/default XxUrkriX
Preparing the "docker+machine" executor 01:03
Using Docker executor with image barichello/godot-ci:mono-3.4.2 ...
Pulling docker image barichello/godot-ci:mono-3.4.2 ...
Using docker image sha256:cb8b24f1fd1d17af2f76eb4bb73dcb5781bfe9be35abb1dba7e9514b8afde8c6 for barichello/godot-ci:mono-3.4.2 with digest barichello/godot-ci@sha256:5f41a0a9ba6ea1eeaa3454863d7e4e8c5d37eee70bea4136d4eabd130a2ed963 ...
@dozingpip Exporting Mono projects for Android is not supported yet: https://github.com/abarichello/godot-ci/issues/50
This error appears when android debug export is setup using the demo ci stage. I don't know if I did something wrong or if it's a bug that needs to be fixed in the docker image.
Version: 3.3.2