hjr-Android:创建Android工程

首先 文件-新建-android application project 

输如应用名字,会自动填充工程名与包名,可以默认,也可以自行更改

接下来有三个选项最小SDK,目标SDK,编译SDK

最小SDK需要大于4.0,否则多出一个对低版本的支持包,还可能有未知问题

目标SDK版本直接用自己开发的手机的版本

编译版本用最高的版本就行,以上API都指Android API不是谷歌API

API后面带wear标志的代表是可穿戴设备,不要选

最后一个主题随意,然后点完成


Logcat直接报一个未捕捉的错误之后程序停止运行,可以用try catch,这样就可以知道具体的错误原因了


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
以下是一个简单的 HTML 代码示例,可以用来制作类似于 iPhone 的网页: ```html <!DOCTYPE html> <html> <head> <title>iPhone 网页示例</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { background-color: #f2f2f2; font-family: Arial, Helvetica, sans-serif; } .container { margin: 20px auto; max-width: 400px; background-color: #fff; border-radius: 10px; padding: 20px; box-shadow: 0px 0px 10px rgba(0,0,0,0.2); } .header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; } .header img { height: 30px; } .navbar { display: flex; background-color: #eee; border-radius: 5px; overflow: hidden; margin-bottom: 20px; } .navbar a { display: block; padding: 10px; text-align: center; flex: 1; text-decoration: none; color: #555; font-weight: bold; } .navbar a.active { background-color: #007aff; color: #fff; } .content { text-align: center; margin-bottom: 20px; } .content img { max-width: 100%; height: auto; margin-bottom: 10px; } .footer { text-align: center; font-size: 12px; color: #aaa; } </style> </head> <body> <div class="container"> <div class="header"> <img src="https://i.imgur.com/6f8yvRP.png" alt="iPhone" /> <button>搜索</button> </div> <div class="navbar"> <a href="#" class="active">主页</a> <a href="#">新闻</a> <a href="#">社交</a> <a href="#">设置</a> </div> <div class="content"> <img src="https://i.imgur.com/4a74HJr.jpg" alt="iPhone" /> <h2>欢迎来到 iPhone 网页示例</h2> <p>这是一个简单的 HTML 示例,用于展示如何制作类似于 iPhone 的网页。</p> </div> <div class="footer"> <p>©2021 iPhone 网页示例</p> </div> </div> </body> </html> ``` 在浏览器中打开该 HTML 文件,即可看到类似于 iPhone 的网页效果。可以根据需要进行修改和调整。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

架构师小侯

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值