摘要:
一,代码: 在activity中增加一行: getSupportActionBar()?.hide() 例子: class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(29)
评论(0)
推荐(0)
摘要:
一,引入lifecycle 1,libs.versions.toml [versions] lifecycle = "2.9.1" [libraries] # lifecycle androidx-lifecycle-livedata-core-ktx = { group = "androidx.l 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(51)
评论(0)
推荐(0)
摘要:
一,安装第三方库 build.gradle.kts中添加 implementation("com.squareup.retrofit2:retrofit:2.9.0") implementation("com.squareup.retrofit2:converter-gson:2.9.0") imp 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(37)
评论(0)
推荐(0)
摘要:
一,报错信息: e: file:///Users/liuhongdi/StudioProjects/Okdemo2/app/src/main/java/com/example/okdemo2/fragment/ApiService.kt:14:67 This declaration needs op 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(221)
评论(0)
推荐(0)
摘要:
一,切换gradle版本: 选择相应的gradle版本: 实际上修改了gradle-wrapper.properties 如下: #Thu Sep 04 11:05:05 CST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrap 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(225)
评论(0)
推荐(0)
kotlin: 报错: org.jetbrains.kotlin.util.FileAnalysisException: While analysing source must not be null
摘要:
一,报错信息: org.jetbrains.kotlin.util.FileAnalysisException: While analysing /Users/liuhongdi/StudioProjects/Okdemo2/app/src/main/java/com/example/okdemo2 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(740)
评论(0)
推荐(0)
摘要:
一,在项目中添加 Kotlin Serialization 插件和依赖 编辑libs.versions.toml,增加以下内容: [versions] kotlin = "2.0.21" kotlinxSerializationJson = "1.9.0" [libraries] # kotlin 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(272)
评论(0)
推荐(0)
摘要:
一,报错信息: FATAL EXCEPTION: main Process: com.example.okdemo2, PID: 3158 java.net.UnknownServiceException: CLEARTEXT communication to www.testit.net not 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(97)
评论(0)
推荐(0)
摘要:
一,启用 编辑build.gradle.kts android { namespace = "com.example.okdemo2" compileSdk = 35 buildFeatures { buildConfig = true viewBinding = true } 二,代码中使用 pa 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(52)
评论(0)
推荐(0)
摘要:
一,问题:android studio提示找不到注解 引入gson后, import com.google.gson.annotations.SerializedName import java.io.Serializable android studio提示找不到注解: 二,解决: 点instal 阅读全文
posted @ 2025-09-06 22:07
刘宏缔的架构森林
阅读(60)
评论(0)
推荐(0)
浙公网安备 33010602011771号