- 使用try catch 打印异常
Log.e(TAG, "post请求捕获的异常:" + getStackTraceString(e))
Log.e(TAG, "post请求捕获的异常:" + e.stackTraceToString())
- 写页面的时候会遇到虚拟系统按键遮挡内容的情况
android:fitsSystemWindows="true" 在最成添加这个属性即可
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/barck_blue"
android:fitsSystemWindows="true"></RelativeLayout >
- 有的时候我们访问gradle很慢我们可以使用镜像访问
https://mirrors.cloud.tencent.com/gradle/gradle-8.6-all.zip