Hello.
I just started learning WebRTС and am studying the examples that come with the source code. androidvoip has no problems launching, everything works fine, but launching androidnativeapi causes the application to crash. The crash occurs after this line:
pcf_deps.media_engine = cricket::CreateMediaEngine(std::move(media_deps));
In logcat I see the next messages:
09-13 11:08:13.512 12290 12318 I webrtc_voice_engine.cc: (line 362): WebRtcVoiceEngine::WebRtcVoiceEngine
09-13 11:08:13.512 12290 12318 I webrtc_video_engine.cc: (line 753): WebRtcVideoEngine::WebRtcVideoEngine()
09-13 11:08:13.512 12290 12318 I android_call_client.cc: (line 169): Media engine created: d160fcb0
09-13 11:08:13.512 12290 12320 I webrtc_voice_engine.cc: (line 384): WebRtcVoiceEngine::Init
09-13 11:08:13.512 12290 12320 I audio_device_impl.cc: (line 67): Create
09-13 11:08:13.512 12290 12320 I audio_device_impl.cc: (line 75): CreateForTest
09-13 11:08:13.513 12290 12320 I audio_device_buffer.cc: (line 66): AudioDeviceBuffer::ctor
09-13 11:08:13.513 12290 12320 I audio_device_impl.cc: (line 120): AudioDeviceModuleImpl
09-13 11:08:13.513 12290 12320 I audio_device_impl.cc: (line 135): CheckPlatform
09-13 11:08:13.513 12290 12320 I audio_device_impl.cc: (line 143): current platform is Android
09-13 11:08:13.513 12290 12320 I audio_device_impl.cc: (line 168): CreatePlatformSpecificObjects
09-13 11:08:13.513 12290 12320 I audio_device_impl.cc: (line 905): PlatformAudioLayer
09-13 11:08:13.513 12290 12320 E audio_device_impl.cc: (line 264): Failed to create the platform specific ADM implementation.
09-13 11:08:13.513 12290 12320 I audio_device_impl.cc: (line 278): ~AudioDeviceModuleImpl
09-13 11:08:13.513 12290 12320 I audio_device_buffer.cc: (line 80): AudioDeviceBuffer::~dtor
09-13 11:08:13.513 12290 12320 E rtc : #
09-13 11:08:13.513 12290 12320 E rtc : # Fatal error in: ../../media/engine/webrtc_voice_engine.cc, line 706
09-13 11:08:13.513 12290 12320 E rtc : # last system error: 0
09-13 11:08:13.513 12290 12320 E rtc : # Check failed: adm_
09-13 11:08:13.513 12290 12320 E rtc : #
09-13 11:08:13.513 12290 12320 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 12320 (worker_thread), pid 12290 (ndroidnativeapi)
After reviewing the audio_device_buffer.cc, I did not see the implementation of an audio device for android. So this is reason why audio_device_ is not valid. Are there any ways to run this application with audio dummy or to fix this? androidnativeapi runs on a real device on Android 11.