【问题标题】:File not found while trying to compile Telegram source code尝试编译 Telegram 源代码时找不到文件
【发布时间】:2015-09-29 14:00:50
【问题描述】:

我正在尝试构建一个像 Telegram 这样的应用程序。我下载了他们的源代码 (https://github.com/DrKLO/Telegram)(适用于 Android)。

我的主要问题是,当我尝试编译代码并将其导出到我的手机时,使用 Android Studio 我收到此错误:

错误:发现任务':TMessagesProj:packageDebug'的配置有问题。

为属性“signingConfig.storeFile”指定的文件“C:\Users\Bogdan\Desktop\Telegram\Telegram-master\TMessagesProj\config\debug.keystore”不存在。

显然缺少一个文件,但是是哪个文件,我该如何解决这个问题?

谢谢!

附:你能提供一个类似这个或类似whatsapp的应用程序的源代码链接吗?

【问题讨论】:

    标签: java android android-studio telegram


    【解决方案1】:

    更改 Telegram/TMessagesProj/build.gradle 并删除或评论 gradle 配置中的签名选项,如下所示:

    apply plugin: 'com.android.application'
    
    repositories {
        mavenCentral()
    }
    
    dependencies {
        compile 'com.android.support:support-v4:22.2.+'
        compile 'com.google.android.gms:play-services:3.2.+'
        compile 'net.hockeyapp.android:HockeySDK:3.5.+'
        compile 'com.googlecode.mp4parser:isoparser:1.0.+'
    }
    
    android {
        compileSdkVersion 22
        buildToolsVersion '22.0.1'
    
        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 RELEASE_STORE_PASSWORD
                keyAlias RELEASE_KEY_ALIAS
                keyPassword RELEASE_KEY_PASSWORD
            }
        }
    */
        buildTypes {
            debug {
                debuggable true
                jniDebuggable true
               // signingConfig signingConfigs.debug
            }
    
            release {
                debuggable false
                jniDebuggable false
                //signingConfig signingConfigs.release
            }
    
            foss {
                debuggable false
                jniDebuggable false
               // signingConfig signingConfigs.release
            }
        }
    
        sourceSets.main {
            jniLibs.srcDir 'libs'
            jni.srcDirs = [] //disable automatic ndk-build call
        }
    
        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 8
            targetSdkVersion 22
            versionCode 572
            versionName "3.0.1"
        }
    }
    

    【讨论】:

    • 谢谢!这就是问题
    • 顺便说一句,您知道如何停止从 Telegram 接收短信以及如何绕过代码验证过程的方法吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多