我在Android Studio中从GitHub导入了电报源。当我尝试调试项目时,出现以下错误:
Information:Gradle tasks [:TMessagesProj:generateArmv7DebugSources,:TMessagesProj:generateArmv7DebugAndroidTestSources]
/Users/Library/Android/sdk/ndk-bundle/build/core/prebuilt-library.mk
Error:(45) *** Android NDK: Aborting . Stop.
Error:A problem occurred configuring project ':TMessagesProj'.
> executing external native build for ndkBuild /Users/AndroidStudioProjects/Telegram/TMessagesProj/jni/Android.mk
我的Android Studio版本是1.5.1,gradle版本是2.3.0。目标SDK为25,系统为Mac。
Build.gradle文件如下:
externalNativeBuild {
ndkBuild {
arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-14"
abiFilters "armeabi-v7a", "x86"
}
}
和Prebuilt_library.mk文件如下:
ifndef prebuilt
$(call __ndk_info,ERROR:$(LOCAL_MAKEFILE):$(LOCAL_MODULE): LOCAL_SRC_FILES points to a missing file)
$(call __ndk_info,Check that $(prebuilt_path) exists, or that its path is correct)
$(call __ndk_error,Aborting)
endif
Android.mk
LOCAL_PATH := $(call my-dir)
LOCAL_MODULE := avutil
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SRC_FILES := ./ffmpeg/armv7-a/libavutil.a
else
ifeq ($(TARGET_ARCH_ABI),armeabi)
LOCAL_SRC_FILES := ./ffmpeg/armv5te/libavutil.a
else
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_SRC_FILES := ./ffmpeg/i686/libavutil.a
endif
endif
endif
include $(PREBUILT_STATIC_LIBRARY)
我不知道如何处理这个问题。