尝试编译Telegram源代码时找不到文件

时间:2015-07-10 17:52:30

标签: java android android-studio telegram

我正在尝试构建像Telegram这样的应用。我下载了他们的源代码(this StackOverflow question)(适用于Android)。

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

错误:在任务配置中发现问题':TMessagesProj:packageDebug'。

  

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

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

谢谢!

P.S。你可以给我一个类似于这个或类似于whatsapp的应用程序源代码的链接吗?

1 个答案:

答案 0 :(得分:7)

更改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"
    }
}
相关问题