简体   繁体   English

android studio,debug.keystore缺失

[英]android studio, debug.keystore missing

After building my project on Android Studio 1.2 on Ubuntu 14.04 I can't get any debug.keystore on the ./android folder which I need for the google maps API. 在Ubuntu 14.04上在Android Studio 1.2上构建我的项目之后,我无法在./android文件夹上获得google maps API所需的任何debug.keystore。 I tried it again and again but could not get it. 我一次又一次地尝试了但却无法得到它。 Can somebody help me? 有人能帮助我吗?

According to documentation.. debug keystore resides in path : $HOME/.android/debug.keystore and if it is not there, it will generate it automatically (After you test your application in debug mode) 根据文档.. debug keystore驻留在路径:$ HOME / .android / debug.keystore中,如果它不存在,它将自动生成它(在调试模式下测试应用程序后)

read this from android developer documentation . android开发者文档中读取此内容

Alternatively, you can generate a keystore without Eclipse with the following JDK command from wither a Windows command prompt or Cygwin with this command: 或者,您可以使用以下JDK命令从Windows命令提示符或使用此命令的Cygwin生成不带Eclipse的密钥库:

keytool -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999

Keytool is a part of the JDK and needs to be in the system PATH to be used in this way. Keytool是JDK的一部分,需要在系统PATH中以这种方式使用。 The path should be something like: C:\\\\bin 路径应该是这样的:C:\\\\ bin

Once generated, be sure to copy the keystore file into the proper location. 生成后,请务必将密钥库文件复制到正确的位置。 If you ran the command from your Cygwin home directory (the directory cygwin starts in), you will find the debug.keystore file here: C:\\\\home\\\\ 如果您从Cygwin主目录(cygwin启动目录)运行命令,您将在此处找到debug.keystore文件:C:\\\\ home \\\\

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM