Keystore file D\\Telegram-master\\TMessagesProj\\c

2019-02-09 00:57发布

问题:

I downloaded new version of Telegram. When run it,This error has shown:

Keystore file D\Telegram-master\TMessagesProj\config\release.keystore not found for signing config 'debug'.

How fix it?

回答1:

Checkout the signingConfig part of build.gradle file:

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

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

RELEASE_STORE_PASSWORD, RELEASE_KEY_ALIAS and RELEASE_KEY_PASSWORD are located in grade.properties file:

RELEASE_KEY_PASSWORD=password
RELEASE_KEY_ALIAS=alias
RELEASE_STORE_PASSWORD=password
android.useDeprecatedNdk=true

Now, you must create a keystore file (one way is to go Build -> Generate Signed APK... and then creating the keystone at the first step), name it release.keystore and place it at D\Telegram-master\TMessagesProj\config\. Note the key password, alias and store password that you used. Put them in the appropriate place in grade.properties file.

Run/Build. The error must be gone.



回答2:

You must create a keystore for your Application so that you can compile it. You can do it in Android Studio :

Go to: Build -> Generate Signed APK, follow the steps Until the key is generated in your desired path. Then rename the file and move it to the directory that it is requested at.

That here is the following as you have mentioned:

D\Telegram-master\TMessagesProj\config\release.keystore


回答3:

Disable some code in build.gradle

/*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
}
}