Telegram source code on android source code gives 'java.lang.UnsatisfiedLinkError:'

Telegram source code on android source code gives 'java.lang.UnsatisfiedLinkError:'

当我在 android studio 中 运行 mac 中的最新电报源时,出现此错误 -

java.lang.UnsatisfiedLinkError: No implementation found for void org.telegram.tgnet.ConnectionsManager.native_setJava(boolean) (tried Java_org_telegram_tgnet_ConnectionsManager_native_1setJava and Java_org_telegram_tgnet_ConnectionsManager_native_1setJava__Z)
            at org.telegram.tgnet.ConnectionsManager.native_setJava(Native Method)
            at org.telegram.messenger.ApplicationLoader.onCreate(ApplicationLoader.java:266)

我应用了此处给出的解决方案 - Android Telegram App --> java.lang.UnsatisfiedLinkError: No implementation found for void 但没有成功。

我什至在 mac 上下载并安装了最新的 NDK。这可能是什么问题?

build.gradle(模块:TMessagesProj)

apply plugin: 'com.android.application'

repositories {
    mavenCentral()
    jcenter()
}

task nativeLibsToJar(
    type: Zip,
    description: 'create a jar archive of the native libs') {
    destinationDir file("$buildDir/native-libs")
    baseName 'native-libs'
    extension 'jar'
    from fileTree(dir: 'libs', include: '**/*.so')
    into 'lib/'
}

tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
}

tasks.withType(JavaCompile) {
    compileTask -> compileTask.dependsOn(nativeLibsToJar)
}

dependencies {
    compile 'com.android.support:support-v4:23.1.+'
    compile 'com.googlecode.mp4parser:isoparser:1.0.+'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')
}

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1'

    useLibrary 'org.apache.http.legacy'
    defaultConfig.applicationId = "org.telegram.messenger"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    signingConfigs {
        debug {
            storeFile file("config/debug.keystore")
        }

        release {
            storeFile file("config/release.keystore")
            storePassword "none"
            keyAlias "RELEASE_KEY_ALIAS"
            keyPassword "RELEASE_KEY_PASSWORD"
        }
    }

    buildTypes {
        debug {
            debuggable true
            jniDebuggable true
            signingConfig signingConfigs.debug
        }
        release {
            debuggable false
            jniDebuggable false
            signingConfig signingConfigs.debug
        }
        foss {
            debuggable false
            jniDebuggable false
            signingConfig signingConfigs.release
        }
    }



    sourceSets.debug {
        manifest.srcFile 'config/debug/AndroidManifest.xml'
    }

    sourceSets.release {
        manifest.srcFile 'config/release/AndroidManifest.xml'
    }

    sourceSets.foss {
        manifest.srcFile 'config/foss/AndroidManifest.xml'
    }

    defaultConfig {

        minSdkVersion 10
        targetSdkVersion 23
        versionCode 719
        versionName "3.4.2"

    }
}

我在尝试在 Intellij idea 中打开项目时也遇到了这个错误,后来我安装了最新版本的 Android studio 并升级了 Gradel 以及 sdk 管理器中所需的存储库,之后所有错误都已消失 - 但请记住,在编制索引时不要尝试做任何事情。