归档:2024年10月
-
Flutter获取屏幕大小及像素密度
2024-10-18 在Flutter中获取屏幕尺寸信息是通过MediaQuery.of(context)来获取。属性说明size一个包含宽度和高度的对象,单位是dp(乘以密度就是你设备的像素)devicePixelRatio密度(像素比)textScaleFactor每个逻辑像素的字体像素数platformBrightness主机平台当前亮度模式viewInsets完全被系统UI(通常是设备的键盘)遮挡的显示部分padding我们通常取上边刘海高度和下边导航高度alwaysUse24HourFormat格式化时间时是否使用24小时格式accessibleNavigation用户是否使用TalkBack或Vo... -
Android Gradle plugin requires Java 17 to run. You are currently using Java 11 的解决办法
2024-10-16 启动项目时,Gradle报下面异常:Failed to apply plugin 'com.android.internal.application'. Android Gradle plugin requires Java 17 to run. You are currently using Java 11. Your current JDK is located in /Applications/Android Studio.app/Contents/jbr/Contents/Home You can try some of the following options: - chan... -
ESP8266点亮板载LED灯