Android内部测试在GooglePlay商店中导致缓存问题
创始人
2024-10-09 10:30:09
0

在Gradle配置中添加以下代码,强制将版本号添加到应用程序 ID 中,以避免Google Play在更新应用程序时使用旧版本的缓存:

android {
    defaultConfig {
        ...
        versionCode 1
        versionName "1.0"
        ...
    }
    applicationVariants.all { variant ->
        variant.outputs.all { output ->
            // Forces the version code to be concatenated to the output file name.
            def newName = output.outputFile.name
            newName = newName.replace(".apk", "-${variant.versionCode}.apk")
            output.outputFile = new File(output.outputFile.parent, newName)
        }
    }
}

相关内容

热门资讯

9分钟了解(aapoker开发... 9分钟了解(aapoker开发)软件透明挂辅助科技(透视)总结教程(2026已更新)(哔哩哔哩);相...
2分钟了解(聚星扑克)软件透明... 2分钟了解(聚星扑克)软件透明挂辅助神器(透视)辅助教程(2024已更新)(哔哩哔哩)是一款可以让一...
第九分钟了解(We辅poker... 第九分钟了解(We辅poker助)黑科技透明挂辅助插件(透视)专业教程(2024已更新)(哔哩哔哩)...
第五分钟了解(wEpoKe)软... 第五分钟了解(wEpoKe)软件透明挂辅助科技(透视)切实教程(2021已更新)(哔哩哔哩);AI辅...
4分钟了解(wepokeai代... 4分钟了解(wepokeai代打)外挂透明挂辅助神器(透视)爆料教程(2026已更新)(哔哩哔哩);...
第2分钟了解(德友汇)外挂智能... 第2分钟了解(德友汇)外挂智能ai辅助代打(透视)辅助教程(2020已更新)(哔哩哔哩);德友汇辅助...
第9分钟了解(Wepoke开发... 第9分钟了解(Wepoke开发)外挂辅助插件安装ai(透视)教你攻略(2025已更新)(哔哩哔哩);...
4分钟了解(wepoker)外... 4分钟了解(wepoker)外挂透明挂辅助ai(透视)力荐教程(2025已更新)(哔哩哔哩);4分钟...
第9分钟了解(WPK工具)外挂... 第9分钟了解(WPK工具)外挂透明挂辅助插件(透视)透明挂教程(2022已更新)(哔哩哔哩);一、W...
第二分钟了解(wpk辅助)黑科... 第二分钟了解(wpk辅助)黑科技透明挂辅助软件(透视)玩家教程(2021已更新)(哔哩哔哩);1、w...