UnsatisfiedLinkError: getting this error in a Telegram project

I downloaded the Telegram project from GitHub and imported it into Android Studio. gradle is created without errors, but when I run it, I get an error UnsatisfiedLinkError.

From logCat:

FATAL EXCEPTION: main Process: org.telegram.messenger.beta, PID: 11299 java.lang.UnsatisfiedLinkError: not implemented for void org.telegram.tgnet.ConnectionsManager.native_setJava (boolean) and Java_org_telegram_tgnet_name_gtnnet_name_gtnnet_gtnnet_name_gtnnet_gamennet_gamennet_gtn .tgnet.ConnectionsManager.native_setJava (native method) at org.telegram.messenger.ApplicationLoader.onCreate (ApplicationLoader.java:278) at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1035) at android.app.ActivityThread.access $ 1500 (ActivityThread.java:155) at android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1378) on android.os.Handler.dispatchMessage (Handler.java:102) on android.os.Looper.loop (Looper.java:135) at android.app.ActivityThread.main (ActivityThread.java UP343) in java.lang. reflect.Method.invoke (native method) in java.lang.reflect.Method.invoke (Method.javahaps72) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:905) on com.android.internal. os.ZygoteInit.main (ZygoteInit.java:700)

And the error line indicates:

ConnectionsManager.native_setJava (android.os.Build.VERSION.SDK_INT == 14 || android.os.Build.VERSION.SDK_INT == 15);

Stuck here for 2 days. Help me out. Thanks in advance.

+4
source share
1 answer

Finally found a solution for him! The project has C and CPP files that require libraries that are in the extension .sowhile working on devices. They recently deleted the files that were added to the commit section. This is why we get an exception during operation. Thus, we have executed these C and CPP codes using NDK and Cygwin.

Download NDK: http://developer.android.com/intl/es/ndk/downloads/index.html

Cygwin: https://www.cygwin.com/

. ( ): https://github.com/DrKLO/Telegram/tree/master/TMessagesProj/jni

+4

Source: https://habr.com/ru/post/1622054/


All Articles