Solved: M1 Unknown host CPU architecture: arm64

On M1 machine, when we build android application, it report this error:

Solved: M1 Unknown host CPU architecture: arm64

On M1 machine, when we build android application, it report this error:Unknown host CPU architecture: arm64

And I find the answer from this website: Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro

The problem we encounter is because our project, use the ndk version 21.0.6113669 , and we solved the problem by updating the ndk-build under ndk folder.

Which ndk version the project is using

In the build.gradle.kts file, there is a setting like this: ndkVersion = "21.0.6113669" , another place to find the ndk version we are using is open the Project Structure (⌘+;) window, select Modules on the left, we can see the ndk version the project are using on the right.

Update file ndk-build

After we get the ndk version, we can navigate to ndk folder at ~/Library/Android/sdk/ndk/<ndk version> .

Change the last line of ndk-build file.

# $DIR/build/ndk-build "$@"

Another try

I think we can also upgrade the ndk version to the latest, which is 24.0.8215888 , if so, the project will work on both M1 and Mac with Intell chip, but after upgrade the ndk, I find that some third party libraries will build failed, so I think for us the best solution is update the ndk-build file.

Read more

AI读经 - 马太福音 第7章

AI读经 - 马太福音 第7章

这段经文出自《马太福音》第7章,是耶稣“登山宝训”的总结部分,主题集中在信徒的内在生命与外在行为。主要内容包括不论断他人(1-5节)、寻求神的帮助(7-12节)、选择生命的道路(13-14节)、提防假先知(15-20节)、真信徒的生命表征(21-23节)、以及听道与行道的重要性(24-27节)。这些教导旨在呼召信徒过敬虔和真实的生活,表现出神国的公义与恩典。

By Stephen Li