(optional) delete debug compilation parameters to reduce the binary volume android-ndk issue ,The file android.toolchain.cmake can be found from $ANDROID_NDK/build/cmake:
# vi $ANDROID_NDK/build/cmake/android.toolchain.cmake
# delete line "-g"
list(APPEND ANDROID_COMPILER_FLAGS
-g
-DANDROID
...)
git clone -b tengine-lite https://github.com/OAID/Tengine.git Tengine
cd Tengine
mkdir build-android-aarch64
cd build-android-aarch64
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="arm64-v8a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-21 ..
make -j$(nproc)
make install
cd Tengine
mkdir build-android-armv7
cd build-android-armv7
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-19 ..
make -j$(nproc)
make install