很多时候上架Android APP需要填写APP的签名信息,现在大多推荐使用 SHA-1/SHA-256
两种格式签名,但还是有一些傻逼平台要求 MD5
签名,如果你通过常规方案获取不到 MD5
签名,你可以尝试使用下面这个软件:
java // 构建错误图片占位符
Widget _buildErrorImage() {
return Container(
width: 120,
height: 80,
decoration: BoxDecoration(
color: Colors.grey.shade200,
borderRadius: BorderRadius.circular(8),
),
child: Icon(
Icons.image_not_supported_outlined,
size: 40,
color: Colors.grey.shade400,
),
);
}
不想多说什么,各种傻逼环境搞得人想吐,Gradle + Java 屎中屎,尤其是出现版本不兼容的情况时!
报错详情:
┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using │ │ for Gradle. │ │ │ │ If you recently upgraded Android Studio, consult the migration guide at │ │ https://flutter.dev/to/java-gradle-incompatibility. │ │ │ │ Otherwise, to fix this issue, first, check the Java version used by Flutter by running `flutter │ │ doctor --verbose`. │ │ │ │ Then, update the Gradle version specified in │ │ E:\work-gt\gt_yuanlitui_app\android\gradle\wrapper\gradle-wrapper.properties to be compatible │ │ with that Java version. See the link below for more information on compatible Java/Gradle │ │ versions: │ │ https://docs.gradle.org/current/userguide/compatibility.html#java │ │ │ │ │
tsmodel Download {
download_id Int @id @default(autoincrement())
user_id Int?
image_id Int
download_date DateTime @default(now())
user User?
image Image
}
上面的 Prisma
表结构实体定义中,其中 user User
这种定义是什么意思?为什么要这么写?这么些有什么作用?在代码中如何使用这么定义的字段?
user User
这种定义是 Prisma 关系(relation)定义的一部分。它用于在 Download
模型和 User
模型之间建立关联。下面我来详细解释一下:
直接说问题及解决办法:
Tailwindcss4
升级后,修改了一些设定,在tailwind3版本是,可能只需要设置 darkMode: 'class',
就自动生效了,但在Tailwind4之后,需要额外配置一个参数,在你的 css
中引入如下配置:
css@import 'tailwindcss';
/* 重点 */
@custom-variant dark (&:where(.dark, .dark *));
经过这个配置后,你就可以想 tailwindcss3
中那这样使用 dark:
来控制 ui 主题颜色了!