gpt4 book ai didi

android - 构建新的 APK 版本时,新更改不适用

转载 作者:行者123 更新时间:2023-11-29 01:02:38 25 4
gpt4 key购买 nike

我正在使用 react native detached 制作一个应用程序,我能够成功构建我的应用程序并为 android 生成 apk 版本,问题是在我添加了更多功能之后,更多代码我无法看到这些功能在我的手机上,它采用旧的 .apk。

问题:我需要做什么才能获得包含最新更改的新版本 .apk。我是否必须从 React prespective 或仅从 Android Studio 做任何事情?

我尝试清理、重建和生成新的签名 apk,但我仍然无法在手机上看到应用程序的新更改,看起来 Android Studio 没有生成具有最新更改的新 apk,它以某种方式生成了旧的缓存或 idk。

有人可以帮忙吗?

最佳答案

生成发布 Apk 步骤:

1.删除android/app/src/main/assets目录下的(index.android.bundle)文件。

2.run $ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

3.删除文件夹(drawable,drawable-hdpi,drawable-mdpi,drawable-xhdpi,drawable-xxhdpi,drawable-xxxhdpi,raw)

4.run $ react-native run-android --variant=release

关于android - 构建新的 APK 版本时,新更改不适用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50022927/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com