Open EddieMeng opened 3 years ago
Hi,
[IMPORTANT] Install Swift 5.0.3 toolchain for Xcode https://swift.org/builds/swift-5.0.3-release/xcode/swift-5.0.3-RELEASE/swift-5.0.3-RELEASE-osx.pkg
I don't see export TOOLCHAINS=org.swift.50320190830a
in your environment setup
Looks like you try to use the android toolchain with your current XCode Swift 5.4. Please follow instructions from the readme.
fatal: unable to access 'https://github.com/readdle/swift-android-buildtools/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Please try to clone in separately:
git clone https://github.com/readdle/swift-android-buildtools
Seems like you have some SSL issues on your machine.
Hello, I did set export TOOLCHAINS=org.swift.50320190830a, but the screenshot above is not complete, here is the completed info
export TOOLCHAINS=org.swift.50320190830a
NDK=17c export ANDROID_NDK_HOME=/Users/Eddie/Downloads/Android/NDK/android-ndk-r$NDK
export NDK_ROOT=$ANDROID_NDK_HOME export ANDROID_NDK=$ANDROID_NDK_HOME export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME
export SWIFT_ANDROID_HOME=$HOME/android/swift-android-current export PATH=$ANDROID_NDK_HOME:$PATH export PATH=$SWIFT_ANDROID_HOME/bin:$SWIFT_ANDROID_HOME/build-tools/current:$PATH
OH, yes, I have no idea why I got the ssl issue, but looks like the log tell me swift build tools completed regardless of the ssl issue fatal: unable to access 'https://github.com/readdle/swift-android-buildtools/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 Swift Build Tools v1.9.6-swift5 installed
I found that ssl issue is the network issue, the latest build info don't report the ssl issue again
Task :app:installSwiftTools Installing Swift Build Tools v1.9.6-swift5 Swift Build Tools v1.9.6-swift5 installed
Task :app:swiftBuildArm64Debug FAILED Swift PM flags: --configuration debug -Xswiftc -DDEBUG dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /Users/userA/swift-android-5.0-r13/toolchain/usr/bin/swift-build Reason: image not found /Users/userA/swift-android-5.0-r13/build-tools/1.9.6-swift5/swift-build: line 58: 5412 Abort trap: 6 $SWIFT_ANDROID_HOME/toolchain/usr/bin/swift-build --destination=<($SELF_DIR/generate-destination-json.sh) $flags "$@"
FAILURE: Build failed with an exception.
Process 'command '/Users/userA/swift-android-5.0-r13/build-tools/1.9.6-swift5/swift-build'' finished with non-zero exit value 134
By the way I build this project by this command: ./gradlew aseembleDebug, is that okay? @andriydruk
Yes, it's ok. We use Gradle build in our CI
Toolchain somewhy can't find your swift installation Could you check your swift version?
swift --version
please check @andriydruk
is it matter with the mac os version, what's your build server mac os version? I don't have clue about why this build error occur. @andriydruk
Hmm, the swift version looks ok.
It should work with BigSur and Catalina. We use macos-latest
on Github CI which is Catalina for now https://github.com/actions/virtual-environments
Maybe try to clean up the project/environment. Check our CI script maybe it will help you https://github.com/andriydruk/swift-weather-app/blob/master/.github/workflows/android-ui.yml
Is your build server build the app by android studio or just gradle? and by the way, what the CI software are you using? @andriydruk
I wanna confirm that is this project build by the github CI server?
We use Gradle in this CI script. But should work with Android Studio as well. And yes it's public Github CI without any priority servers https://docs.github.com/en/actions
@andriydruk Hello andriydruk, thanks for your patient help. I tried the script in github server, it did build successfully. But when I tried to build the project in two different mac os machines, both met this error. Besides, I think I'm not the only one met this error refer to https://github.com/readdle/swift-android-toolchain/issues/20 , so it is probably a common issue in local build. I wanna know had this project ever built successfully in your guys mac os machine? so that I can figure out what went wrong.
Sir, any update on this? @andriydruk
I have one more assumption: maybe problem with the macOS version. In Readdle everybody uses the latest version of Big Sur. Github CI provides macOS 10.15.7 and macOS 11.4 I will add one more CI script to double-check that everything works on both Catalina and Big Sur
@andriydruk Sir, your assumption is correct, after I upgrade the system to latest version of Big Sur, I built the app successfully. I'm very appreciated this toolchain your guys created, the idea is awesome, please keep making it better and better. Besides, I am a fans of Spark email, which is powerful and intelligent, saving me lots of time. is the toolchain was applied in all the projects in Readdle?
@EddieMeng thank you for so warm words! We do our best to provide a good experience for all our users. And we are glad to share our expertise with the developer community.
Currently, we use the Swift Android toolchain only in Spark because it's the only Readdle's app on the Android platform 🙃
Hello, I'm very appreciated the swift-android toolchain you guys built. So I want to build and run this project personally, after set up the environment like the project said (https://github.com/readdle/swift-android-toolchain) , when I started build this project, I meet this error: Process 'command '/swift-android-5.0-r13/build-tools/1.9.6-swift5/swift-build'' finished with non-zero exit value 134. I fail to resolve this issue after many attempts, so here I come to ask you help, could you help me to check what's went wrong.
I list all the related information below:
Here is the build error I meet:
FAILURE: Build failed with an exception.
Here is my environment variable setting in case you want to check it.
I'm looking forward for your reply