上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 171 下一页
摘要: 一,go代码: 目录结构: routes package routes import ( "github.com/gin-gonic/gin" "mediabank/controller" ) func Routes() *gin.Engine { router := gin.Default() / 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(14) 评论(0) 推荐(0)
摘要: 一,目录结构 二,代码 controller package controller import ( "github.com/gin-gonic/gin" "net/http" ) type MediaController struct{} func NewMediaController() Med 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(7) 评论(0) 推荐(0)
摘要: 一,从官网下载 官方站: https://golang.google.cn/dl/ 从命令行下载: $ wget https://golang.google.cn/dl/go1.25.1.linux-amd64.tar.gz 二,安装 解压: $ tar -zxvf go1.25.1.linux-a 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(97) 评论(0) 推荐(0)
摘要: 一,创建项目 $ mkdir mediabank $ cd mediabank/ $ go mod init mediabank go: creating new go.mod: module mediabank $ go get github.com/gin-gonic/gin@latest 二, 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(11) 评论(0) 推荐(0)
摘要: 一,代码: 在activity中增加一行: getSupportActionBar()?.hide() 例子: class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(13) 评论(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 刘宏缔的架构森林 阅读(9) 评论(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 刘宏缔的架构森林 阅读(21) 评论(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 刘宏缔的架构森林 阅读(44) 评论(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 刘宏缔的架构森林 阅读(96) 评论(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 刘宏缔的架构森林 阅读(285) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 171 下一页