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

若如初见. 提交于 2019-11-29 12:38:32

问题


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



回答4:


In my case, I added .jks extension to the location. Then it will recognize the release.keystore.jks

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

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


来源:https://stackoverflow.com/questions/35924675/keystore-file-d-telegram-master-tmessagesproj-config-release-keystore-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!