anyRTC-RTMP-OpenSource
anyRTC-RTMP-OpenSource copied to clipboard
error: 'pthread_condattr_setclock' was not declared in this scope
Build command failed. Error while executing process D:\PlatformSDKs\android-sdk-windows\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\AS_Project\anyRTC-RTMP-OpenSource-master\Prj-Android\jni\toolchain\Android.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=D:/AS_Project/anyRTC-RTMP-OpenSource-master/Prj-Android/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\AS_Project\anyRTC-RTMP-OpenSource-master\Prj-Android\app\build\intermediates\ndkBuild\debug\lib NDK_APPLICATION_MK:=../jni/Application.mk D:/AS_Project/anyRTC-RTMP-OpenSource-master/Prj-Android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libanyrtmp-jni.so} Android NDK: WARNING:D:/AS_Project/anyRTC-RTMP-OpenSource-master/Prj-Android/jni/toolchain/../Android.mk:anyrtmp-jni: non-system libraries in linker flags: -lavformat -lavcodec -lavutil
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING: Unsupported source file extensions in D:/AS_Project/anyRTC-RTMP-OpenSource-master/Prj-Android/jni/toolchain/../../../webrtc/Android.mk for module webrtc
Android NDK: system_wrappers/source/trace_impl.h
[armeabi] Compile++ thumb: webrtc <= event_timer_posix.cc D:/AS_Project/anyRTC-RTMP-OpenSource-master/Prj-Android/jni/toolchain/../../../webrtc/system_wrappers/source/event_timer_posix.cc: In constructor 'webrtc::EventTimerPosix::EventTimerPosix()': D:/AS_Project/anyRTC-RTMP-OpenSource-master/Prj-Android/jni/toolchain/../../../webrtc/system_wrappers/source/event_timer_posix.cc:53:56: error: 'pthread_condattr_setclock' was not declared in this scope pthread_condattr_setclock(&cond_attr, CLOCK_MONOTONIC);
same issue
same issue
Android studio 3.0 canary 8
i saw this code in pthread.h
#if ANDROID_API >= 21 int pthread_condattr_setclock(pthread_condattr_t* _Nonnull, clockid_t) __INTRODUCED_IN(21); #endif /* ANDROID_API >= 21 */
so modify the minsdk to 21 in gradle
defaultConfig { ... minSdkVersion 21 targetSdkVersion 23 .. }
then build success
@Lilee902 thank you
@Lilee902 你的方法可以运行,不知道大家有没有找到可以兼容低版本的方法?