3

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

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

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

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

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

谢谢!

PS你能给我一个类似这个或类似whatsapp的应用程序源代码的链接吗?

4

1 回答 1

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"
    }
}
于 2015-07-13T06:57:35.420 回答