上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 181 下一页
摘要: 一,报错信息: 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 刘宏缔的架构森林 阅读(92) 评论(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 刘宏缔的架构森林 阅读(186) 评论(0) 推荐(0)
摘要: 一,报错信息: org.jetbrains.kotlin.util.FileAnalysisException: While analysing /Users/liuhongdi/StudioProjects/Okdemo2/app/src/main/java/com/example/okdemo2 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(560) 评论(0) 推荐(0)
摘要: 一,在项目中添加 Kotlin Serialization 插件和依赖 编辑libs.versions.toml,增加以下内容: [versions] kotlin = "2.0.21" kotlinxSerializationJson = "1.9.0" [libraries] # kotlin 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(140) 评论(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 刘宏缔的架构森林 阅读(76) 评论(0) 推荐(0)
摘要: 一,启用 编辑build.gradle.kts android { namespace = "com.example.okdemo2" compileSdk = 35 buildFeatures { buildConfig = true viewBinding = true } 二,代码中使用 pa 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(29) 评论(0) 推荐(0)
摘要: 一,问题:android studio提示找不到注解 引入gson后, import com.google.gson.annotations.SerializedName import java.io.Serializable android studio提示找不到注解: 二,解决: 点instal 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(41) 评论(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 刘宏缔的架构森林 阅读(19) 评论(0) 推荐(0)
摘要: 一,添加fragment fragment的ui <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=" 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(21) 评论(0) 推荐(0)
摘要: 一,如图: 查看生成的文件: 指定为默认activity: 编辑:AndroidManifest.xml 把: <activity android:name=".MainActivity" android:exported="false" /> 替换为: <activity android:name 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 181 下一页