我从以下链接https://github.com/DrKLO/Telegram下载了用于android的电报开源代码。导入项目时出现以下错误:
External Native Build Issues
Build command failed.
Error while executing process C:\Users\user\AppData\Local\Android\sdk\ndk
-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Android.mk
NDK_APPLICATION_MK=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Application.mk APP_ABI=armeabi-v7a
NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-14
NDK_OUT=C:/Users/user/AndroidStudioProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/obj
NDK_LIBS_OUT=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\armv7\release\lib
NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: ERROR:C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Android.mk:WebRtcAec: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that C:/Users/user/AndroidStudioProjects/Telegram-master/TMessagesProj/jni/./libtgvoip/external/libWebRtcAec_android_armeabi-v7a.a exists or that its path is correct
process_begin: CreateProcess(NULL, "", ...) failed.
Error:executing external native build for ndkBuild
C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Android.mk
Build command failed.
Error while executing process C:\Users\user\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Android.mk
NDK_APPLICATION_MK=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1
APP_PLATFORM=android-23
NDK_OUT=C:/Users/user/AndroidStudioProjects/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/debug/obj
NDK_LIBS_OUT=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\build\intermediates\ndkBuild\x86_SDK23\debug\lib
NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14
APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: ERROR:C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Android.mk:WebRtcAec: LOCAL_SRC_FILES points to a missing file
如何解决这些问题?
答案 0 :(得分:9)
您的错误原因是libtgvoip是一个子模块,并且您没有递归克隆存储库,因此尚未检出所需的库。
要解决此问题,请转到克隆项目的文件夹并运行
git submodule update --init --recursive
这将检查所需的子模块
答案 1 :(得分:4)