profile
viewpoint

Ask questionsAndroid NDK Error

Build command failed. Error while executing process /Users/mahmoudzaher/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/obj NDK_LIBS_OUT=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-16 -j8 /Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/obj/local/x86_64/libtmessages.30.so}

/Users/mahmoudzaher/Library/Android/sdk/ndk-bundle/build/core/add-application.mk:178: *** Android NDK: APP_STL gnustl_static is no longer supported. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information. . Stop.

when i change APP_STL gnustl_static to APP_STL c++_static or c++_shared as the error expected, i get another error says :

Build command failed. Error while executing process /Users/mahmoudzaher/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/obj NDK_LIBS_OUT=/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-16 -j8 /Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/obj/local/x86_64/libtmessages.30.so} Android NDK: WARNING:/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/libtgvoip/Android.mk:flac: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING: Unsupported source file extensions in /Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/libtgvoip/Android.mk for module flac
Android NDK: ./exoplayer/libFLAC/windows_unicode_filenames
Android NDK: WARNING:/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/libtgvoip/Android.mk:tmessages.30: non-system libraries in linker flags: -latomic
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
[x86_64] Compile : tmessages.30 <= opus.c [x86_64] Compile : tmessages.30 <= opus_decoder.c [x86_64] Compile : tmessages.30 <= opus_encoder.c [x86_64] Compile : tmessages.30 <= opus_multistream.c [x86_64] Compile : tmessages.30 <= opus_multistream_encoder.c [x86_64] Compile : tmessages.30 <= repacketizer.c [x86_64] Compile : tmessages.30 <= opus_multistream_decoder.c [x86_64] Compile : tmessages.30 <= analysis.c [x86_64] Compile : tmessages.30 <= mlp.c [x86_64] Compile : tmessages.30 <= mlp_data.c [x86_64] Compile : tmessages.30 <= opus_projection_encoder.c [x86_64] Compile : tmessages.30 <= opus_projection_decoder.c [x86_64] Compile : tmessages.30 <= mapping_matrix.c [x86_64] Compile : tmessages.30 <= CNG.c [x86_64] Compile : tmessages.30 <= code_signs.c [x86_64] Compile : tmessages.30 <= init_decoder.c [x86_64] Compile : tmessages.30 <= decode_core.c [x86_64] Compile : tmessages.30 <= decode_frame.c [x86_64] Compile : tmessages.30 <= decode_parameters.c [x86_64] Compile : tmessages.30 <= decode_indices.c [x86_64] Compile : tmessages.30 <= decode_pulses.c [x86_64] Compile : tmessages.30 <= decoder_set_fs.c [x86_64] Compile : tmessages.30 <= dec_API.c [x86_64] Compile : tmessages.30 <= enc_API.c [x86_64] Compile : tmessages.30 <= encode_indices.c [x86_64] Compile : tmessages.30 <= encode_pulses.c [x86_64] Compile : tmessages.30 <= gain_quant.c [x86_64] Compile : tmessages.30 <= interpolate.c [x86_64] Compile : tmessages.30 <= LP_variable_cutoff.c [x86_64] Compile : tmessages.30 <= NLSF_decode.c [x86_64] Compile : tmessages.30 <= NSQ.c [x86_64] Compile : tmessages.30 <= NSQ_del_dec.c [x86_64] Compile : tmessages.30 <= PLC.c [x86_64] Compile : tmessages.30 <= shell_coder.c [x86_64] Compile : tmessages.30 <= tables_gain.c [x86_64] Compile : tmessages.30 <= tables_LTP.c [x86_64] Compile : tmessages.30 <= tables_NLSF_CB_NB_MB.c [x86_64] Compile : tmessages.30 <= tables_NLSF_CB_WB.c [x86_64] Compile : tmessages.30 <= tables_other.c [x86_64] Compile : tmessages.30 <= tables_pitch_lag.c [x86_64] Compile : tmessages.30 <= tables_pulses_per_block.c [x86_64] Compile : tmessages.30 <= VAD.c [x86_64] Compile : tmessages.30 <= control_audio_bandwidth.c [x86_64] Compile : tmessages.30 <= quant_LTP_gains.c [x86_64] Compile : tmessages.30 <= VQ_WMat_EC.c [x86_64] Compile : tmessages.30 <= HP_variable_cutoff.c [x86_64] Compile : tmessages.30 <= NLSF_encode.c [x86_64] Compile : tmessages.30 <= NLSF_VQ.c [x86_64] Compile : tmessages.30 <= NLSF_unpack.c [x86_64] Compile : tmessages.30 <= NLSF_del_dec_quant.c [x86_64] Compile : tmessages.30 <= process_NLSFs.c [x86_64] Compile : tmessages.30 <= stereo_LR_to_MS.c [x86_64] Compile : tmessages.30 <= stereo_MS_to_LR.c [x86_64] Compile : tmessages.30 <= check_control_input.c [x86_64] Compile : tmessages.30 <= control_SNR.c [x86_64] Compile : tmessages.30 <= init_encoder.c [x86_64] Compile : tmessages.30 <= control_codec.c [x86_64] Compile : tmessages.30 <= A2NLSF.c [x86_64] Compile : tmessages.30 <= ana_filt_bank_1.c [x86_64] Compile : tmessages.30 <= biquad_alt.c [x86_64] Compile : tmessages.30 <= bwexpander_32.c [x86_64] Compile : tmessages.30 <= bwexpander.c [x86_64] Compile : tmessages.30 <= debug.c [x86_64] Compile : tmessages.30 <= decode_pitch.c [x86_64] Compile : tmessages.30 <= inner_prod_aligned.c [x86_64] Compile : tmessages.30 <= lin2log.c [x86_64] Compile : tmessages.30 <= log2lin.c [x86_64] Compile : tmessages.30 <= LPC_analysis_filter.c [x86_64] Compile : tmessages.30 <= LPC_inv_pred_gain.c [x86_64] Compile : tmessages.30 <= table_LSF_cos.c [x86_64] Compile : tmessages.30 <= NLSF2A.c [x86_64] Compile : tmessages.30 <= NLSF_stabilize.c [x86_64] Compile : tmessages.30 <= NLSF_VQ_weights_laroia.c [x86_64] Compile : tmessages.30 <= pitch_est_tables.c [x86_64] Compile : tmessages.30 <= resampler.c [x86_64] Compile : tmessages.30 <= resampler_down2_3.c [x86_64] Compile : tmessages.30 <= resampler_down2.c [x86_64] Compile : tmessages.30 <= resampler_private_AR2.c [x86_64] Compile : tmessages.30 <= resampler_private_down_FIR.c [x86_64] Compile : tmessages.30 <= resampler_private_IIR_FIR.c [x86_64] Compile : tmessages.30 <= resampler_private_up2_HQ.c [x86_64] Compile : tmessages.30 <= resampler_rom.c [x86_64] Compile : tmessages.30 <= sigm_Q15.c [x86_64] Compile : tmessages.30 <= sort.c [x86_64] Compile : tmessages.30 <= sum_sqr_shift.c [x86_64] Compile : tmessages.30 <= stereo_decode_pred.c [x86_64] Compile : tmessages.30 <= stereo_encode_pred.c [x86_64] Compile : tmessages.30 <= stereo_find_predictor.c [x86_64] Compile : tmessages.30 <= stereo_quant_pred.c [x86_64] Compile : tmessages.30 <= LPC_fit.c [x86_64] Compile : tmessages.30 <= LTP_analysis_filter_FIX.c [x86_64] Compile : tmessages.30 <= LTP_scale_ctrl_FIX.c [x86_64] Compile : tmessages.30 <= corrMatrix_FIX.c [x86_64] Compile : tmessages.30 <= encode_frame_FIX.c [x86_64] Compile : tmessages.30 <= find_LPC_FIX.c [x86_64] Compile : tmessages.30 <= find_LTP_FIX.c [x86_64] Compile : tmessages.30 <= find_pitch_lags_FIX.c [x86_64] Compile : tmessages.30 <= find_pred_coefs_FIX.c [x86_64] Compile : tmessages.30 <= noise_shape_analysis_FIX.c [x86_64] Compile : tmessages.30 <= process_gains_FIX.c [x86_64] Compile : tmessages.30 <= regularize_correlations_FIX.c [x86_64] Compile : tmessages.30 <= residual_energy16_FIX.c [x86_64] Compile : tmessages.30 <= residual_energy_FIX.c [x86_64] Compile : tmessages.30 <= warped_autocorrelation_FIX.c [x86_64] Compile : tmessages.30 <= apply_sine_window_FIX.c [x86_64] Compile : tmessages.30 <= autocorr_FIX.c [x86_64] Compile : tmessages.30 <= burg_modified_FIX.c [x86_64] Compile : tmessages.30 <= k2a_FIX.c [x86_64] Compile : tmessages.30 <= k2a_Q16_FIX.c [x86_64] Compile : tmessages.30 <= pitch_analysis_core_FIX.c [x86_64] Compile : tmessages.30 <= vector_ops_FIX.c [x86_64] Compile : tmessages.30 <= schur64_FIX.c [x86_64] Compile : tmessages.30 <= schur_FIX.c [x86_64] Compile : tmessages.30 <= bands.c [x86_64] Compile : tmessages.30 <= celt.c [x86_64] Compile : tmessages.30 <= celt_encoder.c [x86_64] Compile : tmessages.30 <= celt_decoder.c [x86_64] Compile : tmessages.30 <= cwrs.c [x86_64] Compile : tmessages.30 <= entcode.c [x86_64] Compile : tmessages.30 <= entdec.c [x86_64] Compile : tmessages.30 <= entenc.c [x86_64] Compile : tmessages.30 <= kiss_fft.c [x86_64] Compile : tmessages.30 <= laplace.c [x86_64] Compile : tmessages.30 <= mathops.c [x86_64] Compile : tmessages.30 <= mdct.c [x86_64] Compile : tmessages.30 <= modes.c [x86_64] Compile : tmessages.30 <= pitch.c [x86_64] Compile : tmessages.30 <= celt_lpc.c [x86_64] Compile : tmessages.30 <= quant_bands.c [x86_64] Compile : tmessages.30 <= rate.c [x86_64] Compile : tmessages.30 <= vq.c [x86_64] Compile : tmessages.30 <= armcpu.c [x86_64] Compile : tmessages.30 <= arm_celt_map.c [x86_64] Compile : tmessages.30 <= bitwise.c [x86_64] Compile : tmessages.30 <= framing.c [x86_64] Compile : tmessages.30 <= info.c [x86_64] Compile : tmessages.30 <= internal.c [x86_64] Compile : tmessages.30 <= opusfile.c [x86_64] Compile : tmessages.30 <= stream.c [x86_64] Compile++ : tmessages.30 <= compare_common.cc [x86_64] Compile++ : tmessages.30 <= compare_gcc.cc [x86_64] Compile++ : tmessages.30 <= compare_neon64.cc [x86_64] Compile++ : tmessages.30 <= compare_win.cc [x86_64] Compile++ : tmessages.30 <= compare.cc [x86_64] Compile++ : tmessages.30 <= convert_argb.cc [x86_64] Compile++ : tmessages.30 <= convert_from_argb.cc [x86_64] Compile++ : tmessages.30 <= convert_from.cc [x86_64] Compile++ : tmessages.30 <= convert_jpeg.cc [x86_64] Compile++ : tmessages.30 <= convert_to_argb.cc [x86_64] Compile++ : tmessages.30 <= convert_to_i420.cc [x86_64] Compile++ : tmessages.30 <= convert.cc [x86_64] Compile++ : tmessages.30 <= cpu_id.cc [x86_64] Compile++ : tmessages.30 <= mjpeg_decoder.cc [x86_64] Compile++ : tmessages.30 <= mjpeg_validate.cc [x86_64] Compile++ : tmessages.30 <= planar_functions.cc [x86_64] Compile++ : tmessages.30 <= rotate_any.cc [x86_64] Compile++ : tmessages.30 <= rotate_argb.cc [x86_64] Compile++ : tmessages.30 <= rotate_common.cc [x86_64] Compile++ : tmessages.30 <= rotate_gcc.cc [x86_64] Compile++ : tmessages.30 <= rotate_mips.cc [x86_64] Compile++ : tmessages.30 <= rotate_neon64.cc [x86_64] Compile++ : tmessages.30 <= rotate_win.cc [x86_64] Compile++ : tmessages.30 <= rotate.cc [x86_64] Compile++ : tmessages.30 <= row_any.cc [x86_64] Compile++ : tmessages.30 <= row_common.cc [x86_64] Compile++ : tmessages.30 <= row_gcc.cc [x86_64] Compile++ : tmessages.30 <= row_mips.cc [x86_64] Compile++ : tmessages.30 <= row_neon64.cc [x86_64] Compile++ : tmessages.30 <= row_win.cc [x86_64] Compile++ : tmessages.30 <= scale_any.cc [x86_64] Compile++ : tmessages.30 <= scale_argb.cc [x86_64] Compile++ : tmessages.30 <= scale_common.cc [x86_64] Compile++ : tmessages.30 <= scale_gcc.cc [x86_64] Compile++ : tmessages.30 <= scale_mips.cc [x86_64] Compile++ : tmessages.30 <= scale_neon64.cc [x86_64] Compile++ : tmessages.30 <= scale_win.cc [x86_64] Compile++ : tmessages.30 <= scale.cc [x86_64] Compile++ : tmessages.30 <= video_common.cc [x86_64] Compile : tmessages.30 <= jni.c [x86_64] Compile : tmessages.30 <= audio.c [x86_64] Compile : tmessages.30 <= image.c [x86_64] Compile : tmessages.30 <= video.c [x86_64] Compile : tmessages.30 <= IntroRenderer.c [x86_64] Compile++ : tmessages.30 <= utilities.cpp [x86_64] Compile++ : tmessages.30 <= gifvideo.cpp [x86_64] Compile++ : tmessages.30 <= SqliteWrapper.cpp [x86_64] Compile++ : tmessages.30 <= TgNetWrapper.cpp [x86_64] Compile++ : tmessages.30 <= NativeLoader.cpp [x86_64] Compile++ : tmessages.30 <= fast-edge.cpp [x86_64] Compile : tmessages.30 <= genann.c [x86_64] Compile++ : tmessages.30 <= secureid_ocr.cpp

In file included from /Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/./TgNetWrapper.cpp:2: ./jni/tgnet/ApiScheme.h:14:10: fatal error: 'bits/unique_ptr.h' file not found #include <bits/unique_ptr.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/obj/local/x86_64/objs-debug/tmessages.30/./TgNetWrapper.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from /Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/jni/./gifvideo.cpp:11: ./jni/tgnet/ConnectionsManager.h:18:10: fatal error: 'bits/unique_ptr.h' file not found #include <bits/unique_ptr.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [/Users/mahmoudzaher/Desktop/Telegram-Android-master/TMessagesProj/build/intermediates/ndkBuild/afat/debug/obj/local/x86_64/objs-debug/tmessages.30/./gifvideo.o] Error 1

Telegram-FOSS-Team/Telegram-FOSS

Answer questions MahmoudZaherDeveloper

first of all i would like to thank you for your reply @thermatk after a deep search i finally found the answer . the problem was in the NDK, if we open the local.properties file in the project we will find : ndk.dir=/Users/your-pc/Library/Android/sdk/ndk-bundle

  • according telegram GitHub we should use android-ndk-r16b thus i downloaded it and import it in the previous path of sdk to be -> ndk.dir=/Users/your-pc/Library/Android/sdk/android-ndk-r16b then i follow the other steps and build the project it worked with no errors .
useful!

Related questions

Contacts sync setting is inconsistent when you never allow contact access. hot 1
source:https://uonfu.com/
Github User Rank List