Android Studio 获取sha1
开发软件的时候要使用到百度地图API,开发申请KEY的时候需要开发者提供SHA1证书指纹数据,以前我用的Eclipse在export软件的时候,最后一步会有sha1,但是Android Studio很久也没找到,然后求助google,在stack over flow上找到答案:
Go to your java bin directory via the cmd: C:\Program Files\Java\jdk1.7.0_71\bin> Now type in the below command in your cmd: keytool -list -v -keystore c:\users\your_user_name\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android example: keytool -list -v -keystore c:\users\James\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android and you will get SHA1
于是我按照提示这样这样就好了(我的系统是linux系统,所以操作和上面的答案些许不同,但是基本相同):
1.打开Terminal,输入keytool -list -v -keystore ~/larsoncode/larson@xxx.keystore
注意:~/larsoncode/larson@xxx.keystore 是你key的路径。
然后会提示你输入key密码Enter keystore password:
显示结果:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: larson
Creation date: 21-Oct-2014
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: C=CN
Issuer: C=CN
Serial number: 54460fd4
Valid from: Tue Oct 21 15:48:36 HKT 2014 until: Sun Oct 14 15:48:36 HKT 2040
Certificate fingerprints:
MD5: xxxxxxxxxxx
SHA1: xxxxxxxxxxx
SHA256: xxxxxxxxxxx
Signature algorithm name: SHA1withRSA
Version: 3
*******************************************
*******************************************
相关推荐
在Android开发中,经常要获取sha1证书指纹。例如:在嵌入高德地图的时候,就需要使用这个东东。这个东西在Eclipse中可以直接获取到,但是在Android Studio中,并没有直接提供,需要通过别的手段手动获取。 我们可以...
Android Studio动态加载Fragment和获取实例的方法
我们在使用ListView的时候需要和数据进行绑定,那么问题来了,如何获取SQLite数据库中的数据并动态的显示到ListView当中呢?其实过程很简单:首先要获取SQLite数据(当然首先你要创建一个SQLite数据库并填写了一些...
在Android Studio实现MQTT对主题的订阅和数据的收发,以及将数据封装成对象传回MainActivity,方便进行数据处理,其操作信息在TextView中展示相关的数据。对相关的数据一目了然,同时,在页面中为物联网的开发提供了...
但是在Android Studio中,该怎么获取SHA1的值呢?不要着急,马上呈上~ Android Studio获取SHA1值 强大的Android Studio为我们提供了Terminal这个工具,我们可以通过他进行相应命令从而获取所需内容。 Java中提供了...
Android studio指纹识别demo 添加库,在app登录界面使用指纹识别模块实现指纹登陆
添加库,在app登录界面使用指纹识别模块实现指纹登陆
Android Studio Bumblebee 2021.1.1 Patch 1 (android-studio-2021.1.1.21-windows.exe)大黄蜂,适用于Windows x86_64系统,是Android Studio 4.3(Android Studio Arctic Fox 2020.3.1.26新版本命名)版本之后的新...
Android Studio Bumblebee 2021.1.1 Patch 2 (android-studio-2021.1.1.22-windows.zip)大黄蜂,适用于Windows x86_64系统,是Android Studio 4.3(Android Studio Arctic Fox 2020.3.1.26新版本命名)版本之后的新...
一个简单的获取当前位置经纬度的实例. 适合初学者,在Android Studio下编译通过.
Android Studio Bumblebee 稳定版(android-studio-2021.1.1.20-windows.exe) 大黄蜂,适用于Windows x86_64系统,是Android Studio 4.3(Arctic Fox 2020.3.1.26新版本命名)版本之后的新版本Android Studio ...
用Android Studio 2.3.3做的获取输入文本值例子,主要用到的代码有:mEditText = (EditText)findViewById(R.id.EditText_Input);CharSequence charSequence = mEditText.getText();。
Android Studio Chipmunk Canary 2 (android-studio-2021.2.1.2-windows.zip) 花栗鼠 只适用于Windows系统。 Android Studio 版本倒序排列: Android Studio Chipmunk 2021.2.1 花栗鼠 (新版命名) Android Studio...
Android Studio Electric Eel | 2022.1.1 对应 Android Gradle 插件3.2-7.4版本 Android Gradle 插件和 Android Studio 【详情对应版本】 Android Studio 版本 所需插件版本 Giraffe 2022.3.1 3.2-8.1 Flamingo ...
主要内容为通过手机gps获取经纬度数值,设置sqlite数据库,可以将获取的经纬度保存在数据库中,做了简单的数据滤波,可以求得一点的平均经纬度,并获取该点的其他值与均值的距离,从而观察经纬度的精确度。
Android studio 2.1.2 Android 5.1.1 前言 上一篇介绍了如何获取ethernet的MAC地址,对于厂商来讲,除了MAC号,还有一项数据也很重要,那就是机器序列号,它是机器出厂时确定的,也是主要标识,每台机器都不一样。 要想...
Android Studio Electric Eel 2022.1.1 Canary 2(android-studio-2022.1.1.2-linux.tar.gz) 适用于Linux x86_64系统。 Android Studio版本排序: Electric Eel | 2022.1.1 Dolphin | 2021.3.1 Chipmunk | 2021.2.1...
用Android Studio 2.3.3做的单选框例子,主要用到的代码有:mRadioButton_01 = (RadioButton)findViewById(R.id.RadioButton_01);、boolean b01 = mRadioButton_01.isChecked();、CharSequence charSequence01 = ...