android room exportSchema

摘要: android room exportSchema 设置exportSchema=true 需要添加依赖 build.gradle.kts plugins {// ... val room_version = "2.8.3"id("androidx.room") version "$room_ver 阅读全文
posted @ 2025-12-31 22:44 少杨 阅读(3) 评论(0) 推荐(0)

Unable to find method ''org.gradle.api.provider.Property org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions.getJvmDefault()

摘要: Unable to find method ''org.gradle.api.provider.Property org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions.getJvmDefault() 原因:版本不兼容 更新 libs.ver 阅读全文
posted @ 2025-12-31 21:45 少杨 阅读(5) 评论(0) 推荐(0)

mpg123 库播放mp3

摘要: #include <alloca.h> #include <alsa/asoundlib.h> #include <mpg123.h> int main() { //char* path = "/mnt/usb/music/01 You Only Live Once.mp3"; char* path 阅读全文
posted @ 2025-12-18 23:18 少杨 阅读(5) 评论(0) 推荐(0)

ubuntu libasound2 播放wav

摘要: #include <iostream> #include <alsa/asoundlib.h> void play_wav(const char* filename) { int err; snd_pcm_t *handle; snd_pcm_hw_params_t *params; // 打开 P 阅读全文
posted @ 2025-12-16 22:13 少杨 阅读(6) 评论(0) 推荐(0)

android compose viewModel 传参数

摘要: android compose viewModel 传参数 在MainActivity 里面可以用viewModels val userDao = db.userDao() val viewModel by viewModels<MyArticleViewModel>( factoryProduce 阅读全文
posted @ 2025-11-17 22:59 少杨 阅读(12) 评论(0) 推荐(0)

android Compose 使用 Icons

摘要: Icon(Icons.Rounded.Menu, contentDescription = "Localized description") dependencies { def composeBom = platform('androidx.compose:compose-bom:2025.10. 阅读全文
posted @ 2025-11-17 17:13 少杨 阅读(15) 评论(0) 推荐(0)

android 使用room

摘要: android 使用room 需要安装kts build.gradle.kts plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false a 阅读全文
posted @ 2025-11-05 21:27 少杨 阅读(8) 评论(0) 推荐(0)

jvmTarget: String' is deprecated. Please migrate to the compilerOptions DSL. More details are here: https://kotl.in/u1r8ln

摘要: android 编译提示警告 jvmTarget: String' is deprecated. Please migrate to the compilerOptions DSL. More details are here: https://kotl.in/u1r8ln 把 kotlinOpti 阅读全文
posted @ 2025-11-04 21:38 少杨 阅读(185) 评论(0) 推荐(0)

Unresolved reference 'ksp'

摘要: Unresolved reference 'ksp' ,ksp 报错ksp 版本列表 https://github.com/google/ksp/releasesksp-2.0.21-1.0.27 is too old for kotlin-2.2.21. Please upgrade ksp or 阅读全文
posted @ 2025-11-03 16:22 少杨 阅读(15) 评论(0) 推荐(0)

mysql 查询每个店铺的总金额和各个状态的总金额

摘要: 查询每个店铺的总金额和各个状态的总金额 SELECT shop_id,sum(amount),sum(if( status = 0,amount,0)) as sum1,sum(if( status = 1,amount,0)) as sum2,sum(if( status = 2,amount,0 阅读全文
posted @ 2025-10-15 18:36 少杨 阅读(10) 评论(0) 推荐(0)