Android实战--天气APP

准备工作

1、在github上创建仓库,创建完成后,返回常见本地仓库并添加关联的步骤,按着走就行了
如果是首次,下载git并初始化一个仓库

  • 标记本地仓库的所有者信息
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
  • 生成密钥

ssh-keygen -t rsa -C "[email protected]"

找到.ssh文件夹,用文本编辑器打开“id_rsa.pub”文件,复制内容到剪贴板。
打开 https://github.com/settings/ssh ,点击 Add SSH Key 按钮,粘贴进去保存即可。

2、第一次上传空项目

git add .
git commit -m "注释信息"
git push

3、API接口
http://t.weather.sojson.com/api/weather/city/101310211
http://mobile.weather.com.cn/js/citylist.xml
http://api.map.baidu.com/geocoder?callback=renderReverse&output=json&pois=1&location=<经度,维度>

可行性需求规划

1、可供选择省、市、县
2、手动选择城市,查看具体地方天气;自动显示当前地点天气
3、手动更新天气,自动更新天气

实现展示:

13671484-e0768dde11bf4481.gif
GIF.gif

添加自定义签名

  • 生成自定义签名文件
    Build -> Generate Signed Bundle/APKS->APK->Create new...->
    13671484-be43f40d9bfcc553.png
    2018-11-21_220950.png
  • 右键项目->open module settings->app->signing
填写生成的签名数据
发布了118 篇原创文章 · 获赞 14 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/github_38641765/article/details/86580443