Progress eight

In the fourth week of software engineering for about 6 hours 

200 lines of code amount

A blog

How knowledge points (1) android project Baidu map interface to connect

Before wanted to make a sign to achieve positioning function of APP, later found not so easy, first of all we need to apply Baidu Maps API key, if you want to apply for Baidu Maps API key we need to know the project's development version and release the SHA1, following the step of applying the API is:

1. First, we need to enter the URL of the application http://lbsyun.baidu.com/apiconsole/key, and then create an application, select the Android SDK, which is found in the worst development version and release of SHA1.

2. Developer Edition SHA1 is relatively easier, open cmd, enter the command cd. android, enter. android folder, then enter the command keytool -list -v -keystore debug.keystore, which is the studio debug.keystore default keystore, press Enter, and then enter the secret key: android (default) Enter (secret key library passwords are not visible) as shown below:

So that you can find development version of the SHA1

3. After the release we are looking for SHA1

(1) First generate a signature file. jks find "bulid" in this column in Android Studio menu bar, select "Generate Signed APK", choose to create a new file, Create new. . .

(2) As shown, the information to fill

Key store path: the signature file path

Password: signature password

Confirm: Confirm password

Alias: Aliases

Validity (years): limited duration (years)

First and Last Name : 全名

Organizational Unit: Organizational Unit

Organization: Organization

City or Locality: the city or place

State or Province: State or Province

Country Code (XX): Country Code

 

(3).点击Next.在Build Type选择构建类型release。选择Finish这样就生成了签名文件。

(4).使用DOS命令,切换至签名文件的目录下,输入keytool -list -v -keystore donkor.jks,按下回车键。输入keystore密码,回车之后即可出现发布版SHA1

4.将信息填写成功之后就可以申请到百度地图的API了。

     

Guess you like

Origin www.cnblogs.com/zhang12345/p/10992799.html